danos/system/services
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
..
acpi removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
args-echo removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
block fat/usb-storage: flush the device cache on close so writes survive power-off 2026-07-13 23:29:15 +01:00
crash-test removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
device-list removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
device-manager removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
display removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
display-demo removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
fat removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
fdt removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
init removing init heartbeat in releases 2026-07-20 20:10:24 +01:00
input removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
input-source removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
input-test removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
log-flush removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
power Add runtime.time, drop demo drivers, harden TSC timekeeping 2026-07-13 11:56:43 +01:00
process-test removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
shm-client removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
shm-server removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00
thread-test threads(M4): futex_wait/futex_wake, the blocking primitive 2026-07-20 21:30:57 +01:00
vfs removing the need for panic and _start snippets in user space binaries 2026-07-17 16:15:30 +01:00