summaryrefslogtreecommitdiff
path: root/kernel/include/process.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/process.h')
-rw-r--r--kernel/include/process.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/include/process.h b/kernel/include/process.h
new file mode 100644
index 0000000..ff82924
--- /dev/null
+++ b/kernel/include/process.h
@@ -0,0 +1,21 @@
+#ifndef PROCESS_H
+#define PROCESS_H
+
+#include <types.h>
+#include <libk/list.h>
+
+void save_context_to_rsp(uint64_t irq_rsp, uint64_t task_rsp);
+__attribute__((noreturn)) void restore_context_from_rsp(uint64_t task_rsp);
+
+struct process_t {
+ uint64_t rsp;
+ list_t list;
+};
+typedef struct process_t process_t;
+
+extern process_t process_queue;
+extern process_t *curr_process;
+
+__attribute__((noreturn)) void context_switch(uint64_t irq_rsp);
+
+#endif