diff options
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 68c0241..6bdbf5f 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -13,9 +13,8 @@ #include <stdint.h> #define SYSCALL_RETURN(val) do { \ - long ret = (long)val; \ assert(process_current->state == PS_RUNNING); \ - regs_savereturn(&process_current->regs, ret); \ + regs_savereturn(&process_current->regs, (long)(val)); \ return 0; \ } while (0) @@ -33,16 +32,17 @@ long _syscall_await(void) { { if (iter->noreap) continue; has_children = true; - if (iter->state == PS_DEAD) - SYSCALL_RETURN(process_try2collect(iter)); + if (iter->state == PS_DEAD) { + process_try2collect(iter); + return 0; // dummy + } } if (!has_children) { process_transition(process_current, PS_RUNNING); SYSCALL_RETURN(~0); // TODO errno } - - return -1; // dummy + return 0; // dummy } long _syscall_fork(int flags, handle_t __user *fs_front) { |