scheduler: sched_terminateprogram()

This commit is contained in:
Matheus
2024-05-22 17:10:33 -03:00
parent a8970c4b27
commit 6bc3747856
4 changed files with 18 additions and 16 deletions
+2 -10
View File
@@ -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();
}