summaryrefslogtreecommitdiffstats
path: root/hal
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-09-05 20:24:13 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-09-05 20:24:13 -0400
commit779b7fc1fe91e5a355b6e15de882d46b26ab2270 (patch)
treec62da25a0a0b02488550e856921350fd94668c2b /hal
parent73cbb23130f634bf52ac92da063efd3e6016f8ee (diff)
downloadjove-kernel-779b7fc1fe91e5a355b6e15de882d46b26ab2270.tar.gz
jove-kernel-779b7fc1fe91e5a355b6e15de882d46b26ab2270.tar.bz2
jove-kernel-779b7fc1fe91e5a355b6e15de882d46b26ab2270.zip
working syscalls.
Diffstat (limited to 'hal')
-rw-r--r--hal/obj.h3
-rw-r--r--hal/process.h29
-rw-r--r--hal/smp.h6
3 files changed, 35 insertions, 3 deletions
diff --git a/hal/obj.h b/hal/obj.h
index c988795..93825fd 100644
--- a/hal/obj.h
+++ b/hal/obj.h
@@ -14,7 +14,8 @@ enum
JOVE_OBJ_PAGEFRAME,
JOVE_OBJ_INITRD_FILE,
JOVE_OBJ_FRAMEBUFFER,
- JOVE_OBJ_VIRTTERM
+ JOVE_OBJ_VIRTTERM,
+ JOVE_OBJ_MESSAGE
};
#ifdef __x86_64__
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
diff --git a/hal/smp.h b/hal/smp.h
index 3718f46..ba4f7d2 100644
--- a/hal/smp.h
+++ b/hal/smp.h
@@ -3,8 +3,10 @@
#include "obj.h"
-void *processor_current(void);
+typedef struct processor processor_t;
-jove_obj_t *processor_objdir(void *processor);
+processor_t *processor_current(void);
+
+jove_owned_obj_t *processor_objdir(processor_t *processor);
#endif