git.cappig.dev / apheleiaOS.git master

625fec409726c16266fa8b57a02bb9eac0a682ab master
cappig <[email protected]> ยท 4 months ago
WS ioctl protocol, dirty rect tracking, kernel stats

* Replace WS read/write RPC (ws_req_t/ws_resp_t) with ioctl-based
  commands (ws_cmd_t + WSIOC_* ioctls), remove response slots, add
  separate /dev/wsmgr device for manager event reads
* Add dirty rectangle tracking throughout WM and WS: per-window dirty
  regions, WS_EVT_WINDOW_DIRTY with rect merging, FBIOPRESENT_RECT
  for partial framebuffer updates, damage-driven compositing loop
* Add kernel stats subsystem (stats.c/stats.h) with atomic counters
  for timer IRQ ns, scheduler switches, poll loops, fb present bytes;
  expose via /dev/stats
* Dynamically grow WS window array and create devfs slot nodes on
  demand; per-window surface caching in WM with dirty-rect pread
  refresh, region-clipped rendering
* Extract VFS _resolve_parent_base() and syscall _fd_read/_fd_write
  helpers; add ext2 atime policy, optional COM1 IRQ-driven serial RX
30 files changed, 1654 insertions, 778 deletions
kernel/arch/x86/arch.c +0 -2
kernel/arch/x86/build/build.mk +4 -2
kernel/arch/x86/irq.c +40 -0
kernel/arch/x86/pit.h +2 -0
kernel/arch/x86/serial.c +12 -0
kernel/arch/x86/serial.h +1 -0
kernel/fs/ext2fs.c +39 -3
kernel/main.c +1 -1
kernel/sched/scheduler.c +7 -1
kernel/sys/devfs.c +35 -0
kernel/sys/framebuffer_dev.c +106 -22
kernel/sys/init.c +3 -1
kernel/sys/stats.c created
kernel/sys/stats.h created
kernel/sys/syscall.c +75 -95
kernel/sys/vfs.c +41 -77
kernel/sys/ws.c +393 -319
kernel/sys/ws.h +4 -2
libs/gui/fb.h +8 -0
libs/gui/ui.c +63 -74
libs/gui/ui.h +1 -3
libs/gui/ws.h +9 -34
libs/libc/sys/ioctl.h +12 -0
user/init/main.c +0 -1
user/wm/wm.h +18 -1
user/wm/wm_background.c +46 -0
user/wm/wm_background.h +9 -0
user/wm/wm_loop.c +174 -42
user/wm/wm_rect.h created
user/wm/wm_state.c +442 -98