diff options
| author | user <user@clank> | 2026-07-17 20:22:34 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-17 20:22:34 +0200 |
| commit | bf647581fbad727ad22021d345d3955abf44c2f3 (patch) | |
| tree | 59e77e48c1e07dd181e2c0d693016847c441c662 /include/gbos.inc | |
| parent | net: fix truncated TCP field offsets corrupting multi-segment recv (diff) | |
| download | gbos-bf647581fbad727ad22021d345d3955abf44c2f3.tar.gz gbos-bf647581fbad727ad22021d345d3955abf44c2f3.tar.xz gbos-bf647581fbad727ad22021d345d3955abf44c2f3.zip | |
net: SYS_POLLCON + larger console ring for link-injected input
Programs that own their main loop (the IRC client) need to poll for
typed input without blocking. pollin() only sees the on-screen keyboard;
bytes injected over the link (gbhub 'type', for scripted/hub-driven
sessions) land in the kernel console ring, previously only drained by the
blocking KGetc path. Add SYS_POLLCON: a non-blocking con_pop for
userland.
Also enlarge that console ring 16 -> 64. One net_pump drains an entire
serial burst into the ring at once, so a whole injected command line has
to fit or bytes are dropped and lines merge (a 20-char command came out
truncated and glued to the next). 64 covers a full line; mask stays a
power of two.
Diffstat (limited to 'include/gbos.inc')
| -rw-r--r-- | include/gbos.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/gbos.inc b/include/gbos.inc index e9f8d7d..55f0681 100644 --- a/include/gbos.inc +++ b/include/gbos.inc @@ -133,7 +133,8 @@ DEF SYS_SRECVNB EQU 31 ; link-port: receive, non-blocking (-> A=byte, CF=none) DEF SYS_POLLIN EQU 32 ; poll OSK for a typed char (-> A=char or 0) DEF SYS_NET EQU 33 ; socket layer (DE=&netreq -> A=result) DEF SYS_SLEEP EQU 34 ; cooperative delay (B = 1/64-second units) -DEF SYS_MAX EQU 35 +DEF SYS_POLLCON EQU 35 ; poll console ring (link-injected -> A=byte or 0) +DEF SYS_MAX EQU 36 ; ---- socket layer (SYS_NET) -------------------------------------------------- ; netreq struct (in caller RAM; DE points to it): |
