diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-01 23:44:41 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-01 23:44:41 +0200 |
| commit | fffec0f04dfcc63bef39eb0441cfad7b584da484 (patch) | |
| tree | 394dc1897e04d0aac400061494023d1d16a89dd2 /rsnix/src/sched.rs | |
| parent | rsnix v0.5.2: fault diagnostics + real-hardware scroll-crash hardening (diff) | |
| download | rs-dos-fffec0f04dfcc63bef39eb0441cfad7b584da484.tar.gz rs-dos-fffec0f04dfcc63bef39eb0441cfad7b584da484.zip | |
rsnix v0.5.3: fix real-hardware scroll wedge — per-word display push
The real-hardware crash (2 lines of white + freeze, no CPU exception
even with the 0.5.2 fault dumps) pointed away from a fault and at a
stall: the scroll's full-frame push used one 1.92 MB rep-movsb to the
framebuffer. On QEMU the framebuffer is RAM, so it flies; on a real
GPU the framebuffer is uncached MMIO and the CPU's fast-string burst
path can stall forever — the shell wedges mid-instruction, the cursor
task's own writes wedge too, no exception fires (MMIO writes don't
fault), and the screen shows the torn partial push (the white bands).
The boot-time clear() always worked on the same hardware and uses
per-word volatile stores, so the scroll push now uses the identical
pattern: shadow reads (cached RAM, cheap) + individually-posted
display stores. Interruptible between stores, never a bulk burst,
and functionally identical on QEMU (all 5 suites re-pass).
Also converts the no-shadow fallback shift to the same per-word
pattern. CONTEXT.md updated (scroll-cost note + versioning).
Diffstat (limited to 'rsnix/src/sched.rs')
| -rw-r--r-- | rsnix/src/sched.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rsnix/src/sched.rs b/rsnix/src/sched.rs index cfce58f..f48e210 100644 --- a/rsnix/src/sched.rs +++ b/rsnix/src/sched.rs | |||
| @@ -282,7 +282,11 @@ pub fn spawn(entry: fn(), name: &str) -> Option<usize> { | |||
| 282 | }; | 282 | }; |
| 283 | let ok = spawn_at(id, entry, name); | 283 | let ok = spawn_at(id, entry, name); |
| 284 | unlock(); | 284 | unlock(); |
| 285 | if ok { Some(id) } else { None } | 285 | if ok { |
| 286 | Some(id) | ||
| 287 | } else { | ||
| 288 | None | ||
| 289 | } | ||
| 286 | } | 290 | } |
| 287 | 291 | ||
| 288 | unsafe fn reap(id: usize) { | 292 | unsafe fn reap(id: usize) { |
