aboutsummaryrefslogtreecommitdiff
path: root/include/apos/uapi.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/uapi.h
parentd98ec57128628b81fcd32269a92742a037b7f713 (diff)
downloadkmi-a12e50e5a7dae52ed8bd5a24cc6576371e20985b.tar.gz
kmi-a12e50e5a7dae52ed8bd5a24cc6576371e20985b.zip
Started work on syscalls
Diffstat (limited to 'include/apos/uapi.h')
-rw-r--r--include/apos/uapi.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/apos/uapi.h b/include/apos/uapi.h
new file mode 100644
index 0000000..74fd846
--- /dev/null
+++ b/include/apos/uapi.h
@@ -0,0 +1,29 @@
+#ifndef APOS_UAPI_H
+#define APOS_UAPI_H
+
+#include <apos/vmem.h>
+
+/* syscall function type, let's start with four arguments and see where that
+ * goes */
+typedef vm_t (*sys_t)(vm_t a0, vm_t a1, vm_t a2, vm_t a3);
+
+vm_t sys_req_mem(vm_t size, vm_t flags, vm_t u0, vm_t u1);
+vm_t sys_req_pmem(vm_t paddr, vm_t size, vm_t flags, vm_t u0);
+vm_t sys_req_fixmem(vm_t start, vm_t size, vm_t flags, vm_t u0);
+vm_t sys_req_sharedmem(vm_t pid, vm_t start, vm_t size, vm_t flags);
+vm_t sys_free_mem(vm_t start, vm_t u0, vm_t u1, vm_t u2);
+
+vm_t sys_ipc_server(vm_t callback, vm_t u0, vm_t u1, vm_t u2);
+vm_t sys_ipc_req(vm_t tgt_pid, vm_t d0, vm_t d1, vm_t d2);
+vm_t sys_ipc_resp(vm_t tgt_pid, vm_t ret, vm_t u0, vm_t u1);
+
+vm_t sys_fork(vm_t pid, vm_t u1, vm_t u2, vm_t u3);
+vm_t sys_exec(vm_t pid, vm_t bin, vm_t argc, vm_t argv);
+vm_t sys_signal(vm_t pid, vm_t signal, vm_t u0, vm_t u1);
+vm_t sys_switch(vm_t pid, vm_t u0, vm_t u1, vm_t u2);
+vm_t sys_sync(vm_t buf, vm_t size, vm_t u1, vm_t u2);
+
+vm_t sys_conf(vm_t param, vm_t val, vm_t u0, vm_t u1);
+vm_t sys_poweroff(vm_t type, vm_t u0, vm_t u1, vm_t u2);
+
+#endif /* APOS_UAPI_H */