]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
fix: add rq_enqueue on wake in keyboard, tty, pty drivers
authorTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 03:59:11 +0000 (00:59 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 03:59:11 +0000 (00:59 -0300)
commit5142e0b8ae152f75eb672ba3182968147c26e12b
tree6b6938a2c1056c861cd77ab735cbe6305271ce22
parente9527b35d81f3e9caae4171af4c987cb3160c8fb
fix: add rq_enqueue on wake in keyboard, tty, pty drivers

keyboard.c, tty.c, pty.c all transition processes from BLOCKED to
READY without enqueuing them into the O(1) scheduler runqueue.
This causes woken processes to be invisible to rq_pick_next(),
leading to starvation until the active/expired swap rescues them.

Add sched_enqueue_ready() public API in scheduler.c and call it
from all three wake sites.

Passes: make, cppcheck, QEMU smoke test (10s, all init tests OK).
include/process.h
src/drivers/keyboard.c
src/kernel/pty.c
src/kernel/scheduler.c
src/kernel/tty.c