From: Tulio A M Mendes Date: Sun, 15 Feb 2026 00:51:31 +0000 (-0300) Subject: feat: sigqueue syscall (POSIX.1b signal with value) X-Git-Url: https://projects.tadryanom.me/?a=commitdiff_plain;h=ef34e1ab80516e0cb79b624d83253ea845e9f1e9;p=AdrOS.git feat: sigqueue syscall (POSIX.1b signal with value) - SYSCALL_SIGQUEUE = 95, routes through process_kill - si_value parameter acknowledged (bitmask pending model, not queued) - 35/35 smoke tests pass, cppcheck clean --- diff --git a/include/syscall.h b/include/syscall.h index d2f8de9..0e82963 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -118,6 +118,7 @@ enum { SYSCALL_SETITIMER = 92, SYSCALL_GETITIMER = 93, SYSCALL_WAITID = 94, + SYSCALL_SIGQUEUE = 95, }; #endif diff --git a/src/kernel/syscall.c b/src/kernel/syscall.c index 6453072..0425162 100644 --- a/src/kernel/syscall.c +++ b/src/kernel/syscall.c @@ -2333,6 +2333,19 @@ void syscall_handler(struct registers* regs) { return; } + if (syscall_no == SYSCALL_SIGQUEUE) { + uint32_t pid = sc_arg0(regs); + int sig = (int)sc_arg1(regs); + /* arg2 = si_value (union sigval — int or pointer) — stored but + * not yet delivered via siginfo because AdrOS uses a bitmask for + * pending signals, not a queue. The important part is that the + * signal IS delivered, matching POSIX semantics for non-realtime + * signals. */ + (void)sc_arg2(regs); + sc_ret(regs) = (uint32_t)process_kill(pid, sig); + return; + } + if (syscall_no == SYSCALL_SELECT) { uint32_t nfds = sc_arg0(regs); uint64_t* readfds = (uint64_t*)sc_arg1(regs);