diff options
Diffstat (limited to 'kernel/cpu/syscall.c')
-rw-r--r-- | kernel/cpu/syscall.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index 7734f4e..d47f858 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -87,9 +87,17 @@ void syscall_wait(int *status) { return; } do { + current_task->is_halted = 1; current_task->halts[WAIT_CHILD_HALT] = 1; switch_task(); + if (current_task->is_interrupted) { + break; + } } while (current_task->halts[WAIT_CHILD_HALT]); + if (current_task->is_interrupted) { + current_task->is_interrupted = 0; + return; + } if (status) { *status = current_task->child_rc; } |