59#define PROCESS_STATUS_MAX 256
232#define PROCESS_RCU_THREAD_FOR_EACH(thread, process) LIST_FOR_EACH(thread, &(process)->threads.list, processEntry)
241#define PROCESS_RCU_FOR_EACH(process) LIST_FOR_EACH(process, &_processes, entry)
EFI_PHYSICAL_ADDRESS buffer
#define CONFIG_MAX_RINGS
Maximum rings configuration.
#define CLI_SCOPE()
Macro to increment CLI depth for the duration of the current scope.
void process_kill(process_t *process, const char *status)
Kills a process, pushing it to the reaper.
void process_set_ns(process_t *process, namespace_t *ns)
Sets the namespace of a process.
static process_t * process_current_unsafe(void)
Retrieves the process of the currently running thread without disabling interrupts.
static uint64_t process_rcu_thread_count(process_t *process)
Gets the amount of threads in a process.
process_t * process_get_kernel(void)
Gets the kernel process.
static thread_t * process_rcu_first_thread(process_t *process)
Gets the first thread of a process.
process_t * process_new(priority_t priority, group_member_t *group, namespace_t *ns)
Allocates and initializes a new process.
bool process_has_thread(process_t *process, tid_t tid)
Checks if a process has a thread with the specified thread ID.
#define PROCESS_STATUS_MAX
Maximum length of a process exit status.
void process_remove(process_t *process)
Removes a process from the system.
uint64_t process_set_cmdline(process_t *process, char **argv, uint64_t argc)
Sets the command line arguments for a process.
static process_t * process_current(void)
Retrieves the process of the currently running thread.
list_t _processes
Global list of all processes.
process_flags_t
Process flags enum.
namespace_t * process_get_ns(process_t *process)
Gets the namespace of a process.
process_t * process_get(pid_t id)
Gets a process by its ID.
sched_t PERCPU _pcpu_sched
The per CPU scheduler.
static list_entry_t * list_first(list_t *list)
Gets the first entry in the list without removing it.
uint8_t priority_t
Priority type.
__UINT64_TYPE__ tid_t
Thread Identifier.
__UINT64_TYPE__ pid_t
Process Identifier.
#define CONTAINER_OF_SAFE(ptr, type, member)
Safe container of macro.
static const path_flag_t flags[]
Per-process futex context.
The kernel-side ring context structure.
A entry in a doubly linked list.
A simple ticket lock implementation.
Per-process note handler.
Process exit status structure.
note_handler_t noteHandler
wait_queue_t suspendQueue
_Atomic(process_flags_t) flags
process_threads_t threads
_Atomic(priority_t) priority
Represents the threads in a process.
list_t list
Reads are RCU protected, writes require the lock.
Intrusive RCU head structure.
Reference counting structure.
thread_t *volatile runThread
The currently running thread on this CPU.
Virtual address space structure.
Thread of execution structure.
process_t * process
The parent process that the thread executes within.
The primitive that threads block on.