danos/library/runtime
Daniel Samson 1638845a4b
usb/fat: transfer events matched by slot+endpoint; storage failures heal
B2 — the 1-in-3 boot-time READ CAPACITY failure, root-caused: the xHCI
library's awaitTransfer claimed ANY unclaimed transfer event as its own
completion. An interrupt-endpoint event whose TRB pointer no longer
matched the armed subscription (an error or stale completion from the
keyboard/mouse polling concurrently with storage bring-up) fell through
and was misread as the bulk transfer's completion — desynchronizing the
mass-storage bulk protocol in controller state that SURVIVED driver
restarts, so every retry failed too. Awaited transfers now match the
event's slot id and endpoint DCI; foreign events are dropped and named.
Twelve consecutive runs of the previously-flaky cases pass; the full
suite is green with none of its old intermittents.

B1 — and when storage does fail transiently, the system now heals
instead of giving up forever: a nonzero exit maps to ExitReason.aborted
(a deliberate FAILURE exit — supervisors restart those with backoff,
unlike a clean .exited), usb-storage exits nonzero when a PRESENT
device fails bring-up, and the fat service no longer blocks its harness
polling for a block device and then dies — it serves immediately
(requests fail politely), retries on a 500 ms timer, and mounts
whenever storage appears, including after a driver restart.
2026-07-21 20:27:55 +01:00
..
block.zig usb/fat: transfer events matched by slot+endpoint; storage failures heal 2026-07-21 20:27:55 +01:00
device.zig WIP: USB 2026-07-12 22:24:47 +01:00
display.zig display: runtime mode-setting, EDID, and fenced (vsync) present (v2 V5) 2026-07-14 12:44:21 +01:00
dma.zig M14b: DMA memory (dma_alloc / dma_free) 2026-07-10 19:43:59 +01:00
fs.zig vfs: the root moves into the kernel — resolve + redirect cutover 2026-07-21 16:27:06 +01:00
heap.zig threads(M7): thread-safe allocation (per-aspace mmap arena + locked heap) 2026-07-20 22:57:11 +01:00
input.zig fixing comments 2026-07-12 16:19:09 +01:00
ipc.zig Signals over IPC, one-shot timers, and the service harness (M17.4) 2026-07-12 23:53:38 +01:00
log.zig runtime: std.log for every user binary — kernel-stamped attribution 2026-07-21 15:39:51 +01:00
process.zig Signals over IPC, one-shot timers, and the service harness (M17.4) 2026-07-12 23:53:38 +01:00
root.zig runtime: std.log for every user binary — kernel-stamped attribution 2026-07-21 15:39:51 +01:00
runtime.zig Merge branch 'claude/shm-runtime-meaning-4fce7c' 2026-07-21 17:27:39 +01:00
service.zig The application surface: enumerate, subscribe, and device-list (M18.3) 2026-07-13 00:49:03 +01:00
shared-memory.zig naming: shm → shared_memory — 'shm' is a Unix clipping, not an acronym 2026-07-21 17:26:15 +01:00
start.zig removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
system-call.zig zig fmt 2026-07-12 16:04:58 +01:00
system.zig vfs: the root moves into the kernel — resolve + redirect cutover 2026-07-21 16:27:06 +01:00
thread.zig docs+code: drop misleading fs.base notation for the thread pointer 2026-07-21 01:52:10 +01:00
time.zig Add runtime.time, drop demo drivers, harden TSC timekeeping 2026-07-13 11:56:43 +01:00
usb.zig USB driver stack: xHCI transfers, HID keyboard/mouse, mass storage 2026-07-13 14:11:00 +01:00
user.ld Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00