mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +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:
@@ -8,6 +8,7 @@
|
||||
#include <kernel/vfs.h>
|
||||
#include <kernel/vmm.h>
|
||||
#include <kernel/fd.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define THREAD_PRIORITY_INTERRUPT 0
|
||||
#define THREAD_PRIORITY_KERNEL 1
|
||||
@@ -44,6 +45,7 @@ typedef struct _thread_t{
|
||||
int priority;
|
||||
int umemoperror;
|
||||
void (*umemopfailaddr)();
|
||||
bool shouldexit;
|
||||
} thread_t;
|
||||
|
||||
typedef struct _proc_t{
|
||||
@@ -82,4 +84,5 @@ void sched_runinit();
|
||||
void sched_eventsignal(event_t* event, thread_t* thread);
|
||||
void sched_block(bool interruptible);
|
||||
void sched_yield();
|
||||
void sched_threadexitcheck();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user