diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-04 19:25:12 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-04 19:25:12 +0300 |
| commit | 07c2376702fb3d508d6ffad6b0ce93b83972ad6e (patch) | |
| tree | 9ce46b000f8411fa86118645063b4df05d018dbf /src/uapi/dispatch.c | |
| parent | 66e7f184a925247bac51aae02d01483faa5454fc (diff) | |
| download | kmi-07c2376702fb3d508d6ffad6b0ce93b83972ad6e.tar.gz kmi-07c2376702fb3d508d6ffad6b0ce93b83972ad6e.zip | |
add zombie and orphan threads
+ Should write this down somewhere but the idea is that when a process
gets killed, it frees all the memory it can, making all threads within
that process orphans. Orphaned threads are assigned to the init
process, which will generally call exit() on each one. Zombie threads
are threads that own some bit of shared data, and whose reference
count is above zero. They may not be swapped to or called, even though
they take up space in thread map and reserve their thread ID.
Diffstat (limited to 'src/uapi/dispatch.c')
| -rw-r--r-- | src/uapi/dispatch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/uapi/dispatch.c b/src/uapi/dispatch.c index f0ff724..7cfce4c 100644 --- a/src/uapi/dispatch.c +++ b/src/uapi/dispatch.c @@ -66,7 +66,7 @@ void handle_syscall(sys_arg_t syscall, sys_arg_t a, sys_arg_t b, case SYS_IPC_KICK: sys_ipc_kick(t, a, b, c, d, e); break; case SYS_IPC_RESP: sys_ipc_resp(t, a, b, c, d, e); break; case SYS_IPC_GHOST: sys_ipc_ghost(t, a, b, c, d, e); break; - case SYS_IPC_NOTIFY: sys_ipc_notify(t, a, b, c, d, e); break; + case SYS_NOTIFY: sys_notify(t, a, b, c, d, e); break; case SYS_CREATE: sys_create(t, a, b, c, d, e); break; case SYS_FORK: sys_fork(t, a, b, c, d, e); break; case SYS_EXEC: sys_exec(t, a, b, c, d, e); break; @@ -81,6 +81,7 @@ void handle_syscall(sys_arg_t syscall, sys_arg_t a, sys_arg_t b, case SYS_POWEROFF: sys_poweroff(t, a, b, c, d, e); break; case SYS_SLEEP: sys_sleep(t, a, b, c, d, e); break; case SYS_IRQ_REQ: sys_irq_req(t, a, b, c, d, e); break; + case SYS_EXIT: sys_exit(t, a, b, c, d, e); break; default: error("Syscall %zu outside allowed range [0 - %i]\n", syscall, SYS_NUM - 1); |
