mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 06:28:22 +00:00
add a function that gets called after every system call and make all threads quit on program exit
This commit is contained in:
@@ -380,6 +380,12 @@ __attribute__((noreturn)) int sched_die(){
|
||||
sched_dequeue();
|
||||
}
|
||||
|
||||
void sched_threadexitcheck(){
|
||||
if(arch_getcls()->thread->shouldexit)
|
||||
sched_die();
|
||||
}
|
||||
|
||||
|
||||
void sched_block(bool interruptible){
|
||||
|
||||
thread_t* thread = arch_getcls()->thread;
|
||||
|
||||
Reference in New Issue
Block a user