]> 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)
commit76b41149bc931e756514ead7e2653db5973ab813
tree4a4fadf7602a7ffdd3b1742140d76ef67a8f4bee
parent03233e9135c158016f815d8763a80ae56fb0100d
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