danos/system
Daniel Samson b3a8147bd7 threads(M4): futex_wait/futex_wake, the blocking primitive
New private syscalls futex_wait(addr, expected, timeout_ns)=40 and
futex_wake(addr, count)=41. A waiter is a .blocked task tagged with
Task.futex_addr (no queue linkage); futex_wait reads the user word under the big
lock and parks only if it still equals expected, so a concurrent wake can't slip
between the check and the block. futex_wake scans the task table and readies up
to count waiters in the same address space. A timed wait also sets wake_at so the
existing wakeExpired times it out; futex_addr staying non-zero (only futex_wake
clears it) distinguishes timeout from a real wake. Waiters park in-kernel, so an
idle core still halts (no busy-wait).

runtime.Thread.Futex mirrors std.Thread.Futex (wait/timedWait/wake). thread-test
gains a futex mode: a waiter parks, the main thread wakes it (serial order
waiting/waking/woke, asserted by the case regex), and timedWait reports a
timeout.

Gate thread-futex PASS (3x); 18 guardrail cases green incl. sleep/event/ipc
blocking paths; build + host tests clean.
2026-07-20 21:30:57 +01:00
..
devices display: framebuffer handoff primitive + service design (D1) 2026-07-14 00:54:56 +01:00
drivers added microsoft ps/2 support 2026-07-20 19:45:08 +01:00
kernel threads(M4): futex_wait/futex_wake, the blocking primitive 2026-07-20 21:30:57 +01:00
services threads(M4): futex_wait/futex_wake, the blocking primitive 2026-07-20 21:30:57 +01:00
abi.zig threads(M4): futex_wait/futex_wake, the blocking primitive 2026-07-20 21:30:57 +01:00
boot-handoff.zig zig fmt 2026-07-12 16:04:58 +01:00
initial-ramdisk.zig Post-reorg cleanup: POSIX layer, and naming fixes 2026-07-10 13:33:06 +01:00
parameters.zig USB driver stack: xHCI transfers, HID keyboard/mouse, mass storage 2026-07-13 14:11:00 +01:00