summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2023-08-29 23:35:03 +0200
committerdzwdz2023-08-29 23:35:03 +0200
commitf71af249cfb9ca9eb0832cc46437b2c5cb7bb217 (patch)
treedcc5403d304547da397644b9d43e2bf8c67a0b3e /src/kernel/proc.c
parentdd385a413c92d53a1f792011e1029d7d68e19c6c (diff)
kernel: remove _sys_await, emulate it in libc
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index cd9db9b..bbf939c 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -353,17 +353,13 @@ void proc_tryreap(Proc *dead) {
if (parent->awaited_death.pid && parent->awaited_death.pid != pid) {
return; /* we're not The One */
}
- if (parent->awaited_death.legacy) {
- regs_savereturn(&parent->regs, dead->death_msg);
- } else {
- regs_savereturn(&parent->regs, pid);
- if (parent->awaited_death.out) {
- struct sys_wait2 __user *out = parent->awaited_death.out;
- struct sys_wait2 data;
- memset(&data, 0, sizeof data);
- data.status = dead->death_msg;
- pcpy_to(parent, out, &data, sizeof data);
- }
+ regs_savereturn(&parent->regs, pid);
+ if (parent->awaited_death.out) {
+ struct sys_wait2 __user *out = parent->awaited_death.out;
+ struct sys_wait2 data;
+ memset(&data, 0, sizeof data);
+ data.status = dead->death_msg;
+ pcpy_to(parent, out, &data, sizeof data);
}
proc_setstate(parent, PS_RUNNING);
}