9#include <abi-bits/signal.h>
44#define nullfd ((fd_type) { .io = NULL, .flags = (fd_flags_t) 0 })
46#define PROCESS_MAGIC_PROC MOS_FOURCC('P', 'R', 'O', 'C')
47#define THREAD_MAGIC_THRD MOS_FOURCC('T', 'H', 'R', 'D')
#define MOS_PROCESS_MAX_OPEN_FILES
list_node_t list_head
A linked list head.
#define PROCESS_MAGIC_PROC
basic_string_view< char > string_view
mos::basic_string< char, mos::default_allocator > string
T * create(Args &&...args)
as_linked_list
node in the parent's children list
static Process * New(Process *parent, mos::string_view name)
bool exited
true if the process has exited
platform_process_options_t platform_options
platform per-process flags
process_signal_info_t signal_info
signal handling info
dentry_t * working_directory
mos::list< Thread * > thread_list
Process(Private, Process *parent, mos::string_view name)
list_head children
list of children processes
fd_type files[MOS_PROCESS_MAX_OPEN_FILES]
u32 exit_status
exit status
platform_thread_options_t platform_options
platform-specific thread options
thread_mode mode
user-mode thread or kernel-mode
as_linked_list
node in the process's thread list
downwards_stack_t u_stack
user-mode stack
waitlist_t waiters
list of threads waiting for this thread to exit
downwards_stack_t k_stack
kernel-mode stack
spinlock_t state_lock
protects the thread state
thread_state_t state
thread state
thread_signal_info_t signal_info
sigaction_t handlers[SIGNAL_MAX_N]
signal handlers
waitlist_t sigchild_waitlist
the parent is waiting for a child to exit, if not empty
list_head pending
list of pending signals
sigset_t mask
pending signals mask