diff options
Diffstat (limited to 'include/kernel/proc.h')
| -rw-r--r-- | include/kernel/proc.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/kernel/proc.h b/include/kernel/proc.h index 559b137..b557267 100644 --- a/include/kernel/proc.h +++ b/include/kernel/proc.h @@ -1,6 +1,7 @@ #pragma once #include "common/types.h" #include "kernel/trap.h" +#include "kernel/spinlock.h" struct Context { @@ -44,7 +45,9 @@ struct Proc char name[16]; uint64 sz; - // + struct Proc *parent; + void *chan; + int xstate; }; @@ -57,8 +60,13 @@ namespace ProcManager void create_kernel_thread(void (*func)(), const char *name); void user_init(); + void exit(int status); + int wait(uint64 addr); + void sleep(void *chan, struct spinlock *lk); + void wakeup(void *chan); } void forkret(); struct Proc *myproc(); -void usertrapret();
\ No newline at end of file +void usertrapret(); +int fork();
\ No newline at end of file |
