initial signal implementation

This commit is contained in:
Matheus
2024-05-14 15:04:48 -03:00
parent 00c212fa8d
commit 7b0cc4c51b
22 changed files with 824 additions and 55 deletions
+3 -3
View File
@@ -8,12 +8,12 @@
__attribute__((noreturn)) void syscall_exit(context_t *context, int status) {
thread_t *thread = _cpu()->thread;
proc_t *proc = thread->proc;
__assert(proc != sched_initproc);
__assert(spinlock_try(&proc->exiting)); // only one thread can exit at the same time
if (spinlock_try(&proc->exiting) == false)
sched_threadexit();
sched_stopotherthreads();
proc->status = status;
proc->status = status << 8;
sched_threadexit();
}