summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 3ebda61..8327b68 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -378,6 +378,16 @@ void _syscall_filicide(void) {
process_filicide(process_current, -1);
}
+void _syscall_intr(void) {
+ for (struct process *p = process_current->child; p; p = process_next(p, process_current)) {
+ process_intr(p);
+ }
+}
+
+void _syscall_intr_set(void __user *ip) {
+ process_current->intr_fn = ip;
+}
+
long _syscall_execbuf(void __user *ubuf, size_t len) {
if (len == 0) SYSCALL_RETURN(0);
if (len > EXECBUF_MAX_LEN)
@@ -428,6 +438,8 @@ long _syscall(long num, long a, long b, long c, long d, long e) {
break; case _SYSCALL_PIPE: _syscall_pipe((userptr_t)a, b);
break; case _SYSCALL_SLEEP: _syscall_sleep(a);
break; case _SYSCALL_FILICIDE: _syscall_filicide();
+ break; case _SYSCALL_INTR: _syscall_intr();
+ break; case _SYSCALL_INTR_SET: _syscall_intr_set((userptr_t)a);
break; case _SYSCALL_EXECBUF: _syscall_execbuf((userptr_t)a, b);
break; case _SYSCALL_DEBUG_KLOG: _syscall_debug_klog((userptr_t)a, b);
break;