|
PatchworkOS
19e446b
A non-POSIX operating system.
|
#include <kernel/cpu/cpu.h>#include <kernel/cpu/gdt.h>#include <kernel/fs/ctl.h>#include <kernel/fs/dentry.h>#include <kernel/fs/devfs.h>#include <kernel/fs/file.h>#include <kernel/fs/namespace.h>#include <kernel/fs/path.h>#include <kernel/fs/vfs.h>#include <kernel/io/io.h>#include <kernel/log/log.h>#include <kernel/log/panic.h>#include <kernel/mem/cache.h>#include <kernel/mem/vmm.h>#include <kernel/proc/group.h>#include <kernel/proc/process.h>#include <kernel/proc/reaper.h>#include <kernel/sched/clock.h>#include <kernel/sched/sched.h>#include <kernel/sched/thread.h>#include <kernel/sched/timer.h>#include <kernel/sched/wait.h>#include <kernel/sync/lock.h>#include <kernel/sync/rcu.h>#include <assert.h>#include <errno.h>#include <kernel/sync/seqlock.h>#include <kernel/utils/map.h>#include <kernel/utils/ref.h>#include <stdatomic.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <sys/fs.h>#include <sys/list.h>#include <sys/math.h>#include <sys/proc.h>Go to the source code of this file.
Functions | |
| static | _Atomic (pid_t) |
| static void | process_free (process_t *process) |
| process_t * | process_new (priority_t priority, group_member_t *group, namespace_t *ns) |
| Allocates and initializes a new process. | |
| process_t * | process_get (pid_t id) |
| Gets a process by its ID. | |
| namespace_t * | process_get_ns (process_t *process) |
| Gets the namespace of a process. | |
| void | process_set_ns (process_t *process, namespace_t *ns) |
| Sets the namespace of a process. | |
| void | process_kill (process_t *process, const char *status) |
| Kills a process, pushing it to the reaper. | |
| 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. | |
| bool | process_has_thread (process_t *process, tid_t tid) |
| Checks if a process has a thread with the specified thread ID. | |
| process_t * | process_get_kernel (void) |
| Gets the kernel process. | |
| SYSCALL_DEFINE (SYS_GETPID, pid_t) | |
Variables | |
| static process_t * | kernelProcess = NULL |
| static cache_t | cache = CACHE_CREATE(cache, "process", sizeof(process_t), CACHE_LINE, process_ctor, NULL) |
|
static |
| SYSCALL_DEFINE | ( | SYS_GETPID | , |
| pid_t | |||
| ) |
|
static |