diff options
Diffstat (limited to 'src/stem/task/task.h')
-rw-r--r-- | src/stem/task/task.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/stem/task/task.h b/src/stem/task/task.h index e91aa8b..f59bb2b 100644 --- a/src/stem/task/task.h +++ b/src/stem/task/task.h @@ -6,7 +6,7 @@ #include "idt.h" struct process { - uint32_t pid, uid; + uint32_t pid, uid, privilege, threads; struct process *parent; struct page_directory *pagedir; @@ -17,6 +17,11 @@ struct process { #define TS_SLEEPING 1 //Sleeping for a defined amount of time #define TS_WAIKWAIT 2 //Waiting to be waked up by something precise (thread currently blocked) +#define PL_USER 3 +#define PL_SERVICE 2 +#define PL_DRIVER 1 +#define PL_KERNEL 0 + typedef void (*thread_entry)(void*); struct thread { @@ -34,8 +39,10 @@ extern struct thread *current_thread; void tasking_init(thread_entry whereToGo, void *data); void tasking_switch(); +void tasking_updateKernelPagetable(uint32_t idx, struct page_table *table, uint32_t tablePhysical); uint32_t tasking_handleException(struct registers *regs); -void thread_new(struct process *proc, thread_entry entry_point, void *data); +struct thread * thread_new(struct process *proc, thread_entry entry_point, void *data); +struct process* process_new(struct process *parent, uint32_t uid, uint32_t privilege); #endif |