feat: libc - add SYS_GETCHAR_NB and a non-blocking stdin readiness probe

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NQRTGoYgnZQsh7uCh6Jsxm
This commit is contained in:
2026-08-08 14:42:38 +02:00
co-authored by Claude Opus 5
parent fe10216f8b
commit e8407afcdb
11 changed files with 125 additions and 17 deletions
+6
View File
@@ -233,6 +233,12 @@
Block until a printable character is typed.
char montauk::getchar();
.B SYS_GETCHAR_NB (166)
Return the next printable character, or 0 when none is
pending. Never blocks; key events carrying no ascii are
drained rather than left to stall a following getchar.
char montauk::getchar_nb();
.B SYS_INPUT_WAIT (123)
Block until the input serial number differs from
observedSerial or the timeout elapses; used to sleep