diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2024-03-11 21:30:31 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2024-03-11 21:30:31 -0400 |
commit | d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d (patch) | |
tree | 8f0b5cd8aad31089131785dc6e37b659490f9955 /tsk/tasking.h | |
download | jove-kernel-d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d.tar.gz jove-kernel-d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d.tar.bz2 jove-kernel-d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d.zip |
usermode capable kernel with logging syscall
Diffstat (limited to 'tsk/tasking.h')
-rw-r--r-- | tsk/tasking.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tsk/tasking.h b/tsk/tasking.h new file mode 100644 index 0000000..d217171 --- /dev/null +++ b/tsk/tasking.h @@ -0,0 +1,25 @@ +#ifndef JOVE_TASKING_H +#define JOVE_TASKING_H 1 + +#include <stddef.h> +#include <stdint.h> + +typedef size_t tid_t; + +struct Thread +{ + struct Thread *next; + tid_t id; + uintptr_t kbp; + size_t perm; +}; + +extern struct Thread *thread_current; + +void tasking_setup(void); + +struct Thread *thread_new(struct Thread *parent); +struct Thread *thread_get(tid_t id); +void thread_perm_release(struct Thread *thread, size_t mask); + +#endif |