aboutsummaryrefslogtreecommitdiff
path: root/include/apos/syscalls.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-12-27 20:40:44 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2021-12-27 20:40:44 +0200
commita12e50e5a7dae52ed8bd5a24cc6576371e20985b (patch)
tree70ddf625029dbe1ca4d38ec4f1819fe5fe7e4291 /include/apos/syscalls.h
parentd98ec57128628b81fcd32269a92742a037b7f713 (diff)
downloadkmi-a12e50e5a7dae52ed8bd5a24cc6576371e20985b.tar.gz
kmi-a12e50e5a7dae52ed8bd5a24cc6576371e20985b.zip
Started work on syscalls
Diffstat (limited to 'include/apos/syscalls.h')
-rw-r--r--include/apos/syscalls.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/apos/syscalls.h b/include/apos/syscalls.h
new file mode 100644
index 0000000..d2427cf
--- /dev/null
+++ b/include/apos/syscalls.h
@@ -0,0 +1,36 @@
+#ifndef APOS_SYSCALLS_H
+#define APOS_SYSCALLS_H
+
+/* enum for now, possibly macros in the future once I get an approximate idea of
+ * which syscalls are necessary etc. */
+enum {
+ /* memory management */
+ SYS_REQ_MEM, /* request memory from anywhere */
+ SYS_REQ_PMEM, /* request physical address */
+ SYS_REQ_FIXMEM, /* request memory at fixed address */
+ SYS_FREE_MEM, /* free memory */
+
+ /* IPC */
+ /* I really should try to find my notes about the server/client
+ * structure of the OS, but these following syscalls are probably
+ * required */
+ SYS_IPC_SERVER, /* inform kernel that process should be treated as a server */
+ SYS_IPC_REQ, /* IPC request to server */
+ SYS_IPC_RESP, /* IPC response from server */
+
+ /* process management */
+ SYS_FORK, /* duplicate process */
+ SYS_EXEC, /* execute new binary in process space */
+ SYS_SIGNAL, /* send signal to process (kill etc.) */
+ SYS_SWITCH, /* switch running process */
+ SYS_SYNC, /* used by init process to synchronize running processes, maybe not used */
+
+ /* kernel management */
+ SYS_CONF, /* config system parameters (stack size etc.) */
+ SYS_POWEROFF, /* shutdown/reboot etc. */
+}
+
+/* function declarations should be somewhere else, this file could be used in
+ * userspace applications as well */
+
+#endif /* APOS_SYSCALLS_H */