summaryrefslogtreecommitdiff
path: root/sys/inc/os/process.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/inc/os/process.h')
-rw-r--r--sys/inc/os/process.h15
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_ */