diff options
| author | user <user@clank> | 2026-07-15 23:54:13 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-15 23:54:13 +0200 |
| commit | ab3ebbe227c72b745a46f9233fbfbb27477586b8 (patch) | |
| tree | d71f87605d17c5653f34ebcdef3941f898cd5b91 /src/sched.asm | |
| parent | gbos scaffold: working cooperative microkernel (verified ABAB in emulator) (diff) | |
| download | gbos-ab3ebbe227c72b745a46f9233fbfbb27477586b8.tar.gz gbos-ab3ebbe227c72b745a46f9233fbfbb27477586b8.tar.xz gbos-ab3ebbe227c72b745a46f9233fbfbb27477586b8.zip | |
kernel: implement fork()
- sys_fork: switch to a kernel stack, bump-allocate a cart-RAM bank, copy the
parent's 8 KiB bank via a WRAM bounce buffer, plant a switch-in frame so the
child returns 0 to the post-fork PC, fill the child PCB (shared ROM text)
- add AllocRamBank (bump allocator) + FindFreeSlot helpers
- demo: init forks; parent prints P, child prints C (PCPC...); nested fork
gives three distinct pids (123...)
- README: document the fork mechanism, mark syscall status
Diffstat (limited to 'src/sched.asm')
0 files changed, 0 insertions, 0 deletions
