sched: add basic scheduler, fork syscall

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-21 21:18:51 -04:00
commit b6a9ddd1d0
8 changed files with 133 additions and 8 deletions

View file

@ -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: