summaryrefslogtreecommitdiffstats
path: root/hal/process.h
diff options
context:
space:
mode:
Diffstat (limited to 'hal/process.h')
-rw-r--r--hal/process.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/hal/process.h b/hal/process.h
new file mode 100644
index 0000000..63c800f
--- /dev/null
+++ b/hal/process.h
@@ -0,0 +1,29 @@
+#ifndef _JOVE_HAL_PROCESS_H
+#define _JOVE_HAL_PROCESS_H 1
+
+#include "hal/obj.h"
+
+typedef uintmax_t pid_t;
+
+enum pcb_state
+{
+ PCB_DEAD, PCB_READY, PCB_RUNNING, PCB_BLOCKED
+};
+
+struct pcb_mailbox
+{
+ jove_obj_t *obj;
+ pid_t pid;
+};
+
+typedef struct process_control_block pcb_t;
+
+jove_owned_obj_t *process_current(void);
+
+/*Returns the process ID of the passed PCB. */
+pid_t pcb_pid(pcb_t *pcb);
+
+/*Returns the root kernel object directory of this PCB. */
+jove_owned_obj_t *pcb_rootdir(pcb_t *pcb);
+
+#endif