diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-19 15:27:55 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-19 15:27:55 -0500 |
| commit | 8050901486090cda7123438f588c80da1fe3fee2 (patch) | |
| tree | f17051712dd57d184f2ad846dc1099ff38a9bf3e /sys/inc/os | |
| parent | c3092a9c61c7e791897b04ebd56a1b198db064f9 (diff) | |
kern/amd64+os: proc: Add process initialization
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/inc/os')
| -rw-r--r-- | sys/inc/os/process.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/inc/os/process.h b/sys/inc/os/process.h index 753779a..a2e3fdd 100644 --- a/sys/inc/os/process.h +++ b/sys/inc/os/process.h @@ -31,9 +31,13 @@ #define _OS_PROCESS_H_ 1 #include <sys/types.h> +#include <sys/param.h> #include <sys/queue.h> #include <md/pcb.h> /* shared */ +/* Flags for proc_init() */ +#define PROC_KERN BIT(0) /* Kernel thread */ + /* * Represents a running process on the * system @@ -48,4 +52,15 @@ struct process { TAILQ_ENTRY(process) link; }; +/* + * Initialize a process to a known state + * + * @process: Process to initialize + * @ip: Instruction pointer to jump to + * @flags: Optional flags + * + * Returns zero on success + */ +int process_init(struct process *process, uintptr_t ip, int flags); + #endif /* !_OS_PROCESS_H_ */ |
