sched: add basic scheduler, fork syscall
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
8fc9f1396e
commit
b6a9ddd1d0
8 changed files with 133 additions and 8 deletions
|
|
@ -49,6 +49,7 @@ struct thread {
|
|||
|
||||
struct proc *proc;
|
||||
struct thread *next;
|
||||
uaddr_t kstack_top;
|
||||
};
|
||||
|
||||
struct proc {
|
||||
|
|
@ -85,5 +86,8 @@ struct proc *proc_create(struct thread *parent);
|
|||
void proc_free(struct proc *proc);
|
||||
void switch_to(struct thread *from, struct thread *to);
|
||||
void proc_init();
|
||||
pid_t sys_fork();
|
||||
void schedule();
|
||||
pid_t alloc_pid();
|
||||
|
||||
#endif /* _PROC_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue