]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
kernel: remove dead-code duplicate SETITIMER/GETITIMER from socket_syscall_dispatch
authorTulio A M Mendes <[email protected]>
Sun, 19 Apr 2026 19:16:01 +0000 (16:16 -0300)
committerTulio A M Mendes <[email protected]>
Sun, 19 Apr 2026 19:16:01 +0000 (16:16 -0300)
commit394998e4cf987fb27f46fc1c35ffbae78f133890
tree1c60211605ce1e5db48645e8e4eef3c7169365f1
parentec905308f7f0d0bded28075c83f447d844918c2e
kernel: remove dead-code duplicate SETITIMER/GETITIMER from socket_syscall_dispatch

The SETITIMER and GETITIMER syscall handlers were implemented twice:
1. In syscall_handler (lines 3941/4005) — using proper POSIX struct
   k_itimerval with tv_sec/tv_usec fields and timeval_to_ticks/
   ticks_to_timeval conversion helpers.
2. In socket_syscall_dispatch (lines 4673/4729) — using raw uint32_t
   tick pairs, which would be incorrect if ever reached.

The socket_syscall_dispatch versions were dead code because the main
handler returns before falling through to socket dispatch. Removing
them eliminates confusion and prevents accidental use of the incorrect
tick-based format.

Part of POSIX compliance audit: all 141 SYSCALL_ enum values now
have exactly one handler each.

Tests: 103/103 QEMU, 16/16 battery, 69/69 host — zero regressions.
src/kernel/syscall.c