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
|
|
@ -98,7 +98,16 @@ irq_common:
|
|||
2:
|
||||
add rsp, 8
|
||||
iretq
|
||||
|
||||
|
||||
/* Called by switch_to's ret when a thread is first scheduled.
|
||||
* RSP points at user_rsp (set up by sys_fork / sched_init).
|
||||
* rcx and r11 already set from pop_all (rcx=entry, r11=rflags).
|
||||
*/
|
||||
.global sched_start
|
||||
sched_start:
|
||||
pop rsp
|
||||
swapgs
|
||||
sysretq
|
||||
|
||||
.global _syscall_enter
|
||||
_syscall_enter:
|
||||
|
|
|
|||
Loading…
Reference in a new issue