mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
scheduler: sched_terminateprogram()
This commit is contained in:
@@ -6,14 +6,6 @@
|
||||
#include <semaphore.h>
|
||||
|
||||
__attribute__((noreturn)) void syscall_exit(context_t *context, int status) {
|
||||
thread_t *thread = _cpu()->thread;
|
||||
proc_t *proc = thread->proc;
|
||||
if (spinlock_try(&proc->exiting) == false)
|
||||
sched_threadexit();
|
||||
|
||||
sched_stopotherthreads();
|
||||
|
||||
proc->status = status << 8;
|
||||
|
||||
sched_threadexit();
|
||||
sched_terminateprogram(status << 8);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user