You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SUBISSUE #2] Implement sigaltstack, rt_sigsuspend, rt_sigtimedwait, rt_sigpending, and rt_sigqueueinfo #286
Complete POSIX real-time signal syscalls required by glibc and multi-threaded runtimes:
kernel/uapi/signal.hpp: Define extern "C" LP64 linux_stack_t (24 bytes: ss_sp, ss_flags, ss_size), SS_ONSTACK/SS_DISABLE, SA_ONSTACK, and linux_siginfo_t (128 bytes) with static_assert checks.
kernel/process/Signal.hpp & kernel/process/Signal.cpp: Track per-thread alternate signal stack state, switch SP_EL0 to the alternate stack on SA_ONSTACK delivery in deliver_pending_signals(), and restore properly on rt_sigreturn.
kernel/syscalls/SignalSyscalls.cpp & kernel/syscalls/SyscallDispatcher.cpp: Implement and dispatch sys_sigaltstack (132), sys_rt_sigsuspend (133), sys_rt_sigpending (136), sys_rt_sigtimedwait (137), and sys_rt_sigqueueinfo (138).
Out of scope: signalfd4 (Phase 2), ptrace signal interception (Phase 6).
Acceptance Criteria & Edge Cases
sigaltstack rejects ss_size < MINSIGSTKSZ (-ENOMEM), rejects modifying an active SS_ONSTACK stack (-EPERM), and switches SP_EL0 cleanly on SA_ONSTACK delivery
rt_sigsuspend atomically swaps the blocked mask, sleeps until an unblocked signal arrives, returns -EINTR, and restores the original mask after handler execution
rt_sigtimedwait dequeues matching pending signals synchronously or returns -EAGAIN on timeout / -EINVAL on negative timespec
rt_sigpending reports currently pending blocked signals without consuming them; rt_sigqueueinfo rejects spoofing invalid si_code on other processes (-EPERM)
make format && make clean-tests && make -j"$(nproc)" all && make -j"$(nproc)" quality passes with zero warnings
Activity