157typedef struct process
process_t * process_new(priority_t priority)
Allocates and initializes a new process.
void process_reaper_init(void)
Initializes the process reaper.
process_t * process_get_kernel(void)
Gets the kernel process.
bool process_has_thread(process_t *process, tid_t tid)
Checks if a process has a thread with the specified thread ID.
void process_procfs_init(void)
Initializes the /proc directory.
uint64_t process_set_cmdline(process_t *process, char **argv, uint64_t argc)
Sets the command line arguments for a process.
uint64_t process_copy_env(process_t *dest, process_t *src)
Copies the environment variables from one process to another.
void process_kill(process_t *process, int32_t status)
Kills a process.
process_flags_t
Process flags enum.
uint8_t priority_t
Priority type.
__UINT64_TYPE__ tid_t
Thread Identifier.
__UINT64_TYPE__ pid_t
Process Identifier.
static const path_flag_t flags[]
Directory entry structure.
Per-process futex context.
A entry in a doubly linked list.
A simple ticket lock implementation.
mount_t * self
The /proc/self bind mount.
list_t envVars
List of dentries in the /proc/[pid]/env/ directory.
wait_queue_t suspendQueue
_Atomic(process_flags_t) flags
dentry_t * proc
The /proc/[pid] directory, also stored in dentries for convenience.
list_t dentries
List of dentries in the /proc/[pid]/ directory.
dentry_t * env
The /proc/[pid]/env directory, also stored in dentries for convenience.
process_threads_t threads
_Atomic(priority_t) priority
Represents the threads in a process.
Reference counting structure.
Virtual address space structure.
The primitive that threads block on.