aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall
diff options
context:
space:
mode:
authorMarvin Borner2020-05-06 22:34:38 +0200
committerMarvin Borner2020-05-06 22:34:38 +0200
commit8083536f321ad8a12ad4668c2bf41a65c3e3b2f6 (patch)
tree427d7da11944b299bdce3041259bf8fd31971ede /src/kernel/syscall
parentd94ffac4a584dc7a4f6f2ec567b8caab05ce9253 (diff)
Added event mapping driver
Diffstat (limited to 'src/kernel/syscall')
-rw-r--r--src/kernel/syscall/actions/sys_get.c7
-rw-r--r--src/kernel/syscall/actions/sys_map.c8
-rw-r--r--src/kernel/syscall/syscall.c4
-rw-r--r--src/kernel/syscall/syscall.h4
4 files changed, 22 insertions, 1 deletions
diff --git a/src/kernel/syscall/actions/sys_get.c b/src/kernel/syscall/actions/sys_get.c
new file mode 100644
index 0000000..8a4a643
--- /dev/null
+++ b/src/kernel/syscall/actions/sys_get.c
@@ -0,0 +1,7 @@
+#include <stdint.h>
+
+u32 sys_get(u32 id)
+{
+ // TODO: Implement get syscall
+ return -1;
+} \ No newline at end of file
diff --git a/src/kernel/syscall/actions/sys_map.c b/src/kernel/syscall/actions/sys_map.c
new file mode 100644
index 0000000..63bfd9d
--- /dev/null
+++ b/src/kernel/syscall/actions/sys_map.c
@@ -0,0 +1,8 @@
+#include <stdint.h>
+#include <events/event.h>
+
+u32 sys_map(u32 id, u32 *function)
+{
+ event_map(id, function);
+ return -1;
+} \ No newline at end of file
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c
index 92c0dbe..820afc7 100644
--- a/src/kernel/syscall/syscall.c
+++ b/src/kernel/syscall/syscall.c
@@ -17,7 +17,9 @@ u32 (*syscalls[])() = { [SYS_HALT] = (u32(*)())halt_loop, // DEBUG!
[SYS_EXEC] = sys_exec,
[SYS_GET_PID] = sys_get_pid,
[SYS_MALLOC] = sys_malloc,
- [SYS_FREE] = sys_free };
+ [SYS_FREE] = sys_free,
+ [SYS_GET] = sys_get,
+ [SYS_MAP] = sys_map };
void syscall_handler(struct regs *r)
{
diff --git a/src/kernel/syscall/syscall.h b/src/kernel/syscall/syscall.h
index 7261afc..0cfa3a7 100644
--- a/src/kernel/syscall/syscall.h
+++ b/src/kernel/syscall/syscall.h
@@ -24,4 +24,8 @@ u32 sys_malloc(u32 count);
u32 sys_free(u32 ptr);
+u32 sys_get(u32 id);
+
+u32 sys_map(u32 id, u32 *function);
+
#endif \ No newline at end of file