git.cappig.dev / apheleiaOS.git master

2b42ad9aff2e2d3b7f9e940c298ffb3e52e413b7 master
cappig <[email protected]> ยท 4 months ago
Drop /dev/input aggregator, procfs cwd and umask

* Remove kernel input.c/h; keyboard and mouse each manage their own
  wait queue, poll callback, and blocking read with EINTR/EAGAIN
  support; rename /dev/kbd to /dev/keyboard
* Add procfs cwd and umask entries: sched_proc_cwd() copies thread
  cwd under lock, sched_getumask/sched_setumask mirror the umask
  field; expose umask as octal in the stat file
* Remove SYS_GETCWD and SYS_UMASK syscalls; re-implement getcwd()
  and umask() in libc_usr via /proc/self/cwd and /proc/self/umask;
  renumber remaining syscall table entries
* Replace ui_t input_fd with keyboard_fd + mouse_fd; ui_input() reads
  key_event/mouse_event structs directly, translates to input_event_t
  inline with modifier tracking and round-robin fairness
* Expand WM poll loop from 2 to 3 fds (keyboard, mouse, wm manager)
15 files changed, 596 insertions, 421 deletions
kernel/main.c +0 -5
kernel/sched/scheduler.c +50 -0
kernel/sched/scheduler.h +4 -0
kernel/sys/input.c removed
kernel/sys/input.h removed
kernel/sys/keyboard.c +52 -8
kernel/sys/mouse.c +61 -8
kernel/sys/procfs.c +40 -1
kernel/sys/syscall.c +0 -39
libs/gui/ui.c +228 -6
libs/gui/ui.h +7 -1
libs/libc/unistd.h +22 -24
libs/libc_usr/unistd.c +125 -40
user/wm/main.c +1 -1
user/wm/wm_loop.c +6 -5