summaryrefslogtreecommitdiffstats
path: root/rsnix/src/lib.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-01 17:38:57 +0200
committersalmonik <salmonik@tuta.io>2026-08-01 17:38:57 +0200
commit8f05ea44f69cb796e7b1f581ba1b8045c98d615b (patch)
tree3049f0a5fc33dd08f94af0e6493c588b2a4818b9 /rsnix/src/lib.rs
parentCONTEXT.md: versioning policy (a.b.c — overhaul/feature/fix) (diff)
downloadrs-dos-8f05ea44f69cb796e7b1f581ba1b8045c98d615b.tar.gz
rs-dos-8f05ea44f69cb796e7b1f581ba1b8045c98d615b.zip
rsnix: preemptive kernel tasks (ADR 0003) — sched, IST fault stacks, 176-byte frames
- sched: 16-slot static table, shell=task 0, idle=task 1, spawn with guard page + 8 KiB stack, RR on the 100 Hz tick, int 0x60 yield, sleep_ms, lazy reap, jobs/bg/sleep/kill shell commands - gdt: own GDT mirroring UEFI selectors + TSS with IST1/IST2 (guard-page overflows die gracefully instead of triple-faulting) - interrupts: isr_dispatch returns next frame in rax; IntFrame grows rsp/ss fields — QEMU's 64-bit iretq always pops all five slots from a 176-byte frame, so synthetic task frames must carry rsp=top+ss (a 160-byte frame made the first iretq pop rsp/ss from the unmapped page beyond the frame) - panic handler: task panics abort the task, shell keeps running - main: sched::init moved after page allocator + adopted tables (the idle's stack+guard need both; it was silently not spawning)
Diffstat (limited to '')
-rw-r--r--rsnix/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/rsnix/src/lib.rs b/rsnix/src/lib.rs
index a2d41da..08ac6c2 100644
--- a/rsnix/src/lib.rs
+++ b/rsnix/src/lib.rs
@@ -6,6 +6,7 @@ pub mod ahci;
6pub mod fat; 6pub mod fat;
7pub mod font; 7pub mod font;
8pub mod fs; 8pub mod fs;
9pub mod gdt;
9pub mod gop; 10pub mod gop;
10pub mod interrupts; 11pub mod interrupts;
11pub mod klog; 12pub mod klog;
@@ -15,6 +16,7 @@ pub mod pci;
15pub mod power; 16pub mod power;
16pub mod ps2; 17pub mod ps2;
17pub mod rtc; 18pub mod rtc;
19pub mod sched;
18pub mod serial; 20pub mod serial;
19pub mod strbuf; 21pub mod strbuf;
20pub mod tty; 22pub mod tty;