62 panic(
NULL,
"Failed to create process reaper thread");
NORETURN void panic(const interrupt_frame_t *frame, const char *format,...)
Panic the kernel, printing a message and halting.
void reaper_push(process_t *process)
Pushes a process to be reaped later.
void reaper_init(void)
Initializes the process reaper.
void process_dir_deinit(process_t *process)
Deinitializes the /proc/[pid] directory of a process.
clock_t clock_uptime(void)
Retrieve the time in nanoseconds since boot.
tid_t thread_kernel_create(thread_kernel_entry_t entry, void *arg)
Creates a new thread that runs in kernel mode and submits it to the scheduler.
uint64_t sched_nanosleep(clock_t timeout)
Sleeps the current thread for a specified duration in nanoseconds.
#define LOCK_CREATE()
Create a lock initializer.
static void lock_release(lock_t *lock)
Releases a lock.
static void lock_acquire(lock_t *lock)
Acquires a lock, blocking until it is available.
#define CONFIG_PROCESS_REAPER_INTERVAL
Process reaper interval configuration.
static list_entry_t * list_pop_first(list_t *list)
Pops the first entry from the list.
static void list_push_back(list_t *list, list_entry_t *entry)
Pushes an entry to the end of the list.
#define LIST_CREATE(name)
Creates a list initializer.
static bool list_is_empty(list_t *list)
Checks if a list is empty.
clock_t uptime(void)
System call for retreving the time since boot.
#define NULL
Pointer error value.
#define ERR
Integer error value.
#define CONTAINER_OF(ptr, type, member)
Container of macro.
__UINT64_TYPE__ clock_t
A nanosecond time.
static clock_t nextReaperTime
static void reaper_thread(void *arg)
A simple ticket lock implementation.
process_threads_t threads