diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-06 20:50:36 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-06 20:50:36 +0300 |
| commit | 9c0f26d26366ff7def20d5be6aff5e0f93976ad6 (patch) | |
| tree | 3872c5a1018a232e51da3f774ca54ae2e9967427 /src/orphanage.c | |
| parent | e9da1d29939a74e186afc39f2fce8e085764fea0 (diff) | |
| download | kmi-9c0f26d26366ff7def20d5be6aff5e0f93976ad6.tar.gz kmi-9c0f26d26366ff7def20d5be6aff5e0f93976ad6.zip | |
adjust stack handling
Diffstat (limited to 'src/orphanage.c')
| -rw-r--r-- | src/orphanage.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/orphanage.c b/src/orphanage.c index 4760f73..9da6f8b 100644 --- a/src/orphanage.c +++ b/src/orphanage.c @@ -34,9 +34,14 @@ void unorphanize(struct tcb *t) t->pid = 1; t->eid = 1; + free_stack(t); + reset_rpc_stack(t); + t->proc = init->proc; - t->rpc_stack = RPC_STACK_BASE; use_vmem(t->proc.vmem); + alloc_stack(t); + + clear_bits(t->state, TCB_ORPHAN); catastrophic_assert(init->callback); set_args3(t, 0, SYS_USER_ORPHANED, t->tid); |
