diff options
author | dzwdz | 2021-08-22 11:58:47 +0200 |
---|---|---|
committer | dzwdz | 2021-08-22 11:58:47 +0200 |
commit | 175b575bbdca5d620c1ace1281568b2bb9c6b021 (patch) | |
tree | c2a660ca76031acb07c3b9648022b781dddfeb50 /src/kernel/syscalls.c | |
parent | 5aaf1d48ec052d1582eae2c7642adc8829a6711b (diff) |
kernel: implement assert
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index bdf77af..09b3507 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -9,8 +9,8 @@ _Noreturn static void await_finish(struct process *dead, struct process *listene size_t len; bool res; - if ( dead->state != PS_DEAD ) panic(); - if (listener->state != PS_WAITS4CHILDDEATH) panic(); + assert(dead->state == PS_DEAD); + assert(listener->state == PS_WAITS4CHILDDEATH); dead->state = PS_DEADER; listener->state = PS_RUNNING; |