pub fn sys_exit(code: u64)Expand description
sys_exit(code)
Mark the current task Dead so that it will never be scheduled again. We do not reclaim its memory yet. The scheduler (or a kernel worker thread) will clean up zombie tasks later. The trap_gate will check for the task state, and will never return to user context if the task has been marked as Dead.