Module signal

Module signal 

Source
Expand description

Linux RISC-V 64 signal syscalls and signal handling

Implements POSIX signals with Linux-compatible semantics, integrated with Scarlet’s event system for cross-ABI signal delivery.

Structs§

SignalMask
Signal mask for blocking signals
SignalState
Signal handler state for a task

Enums§

LinuxSignal
Linux signal numbers (POSIX standard)
SignalAction
Signal action types

Functions§

deliver_signal_to_task
Deliver a signal to a task’s signal state
get_next_pending_signal
Check if task has pending signals and return the next one to handle
handle_event_to_signal
Handle incoming event and convert to signal if needed
handle_fatal_signal_immediately
Handle fatal signals that should terminate immediately This is a simplified implementation for basic signal handling
is_fatal_signal
Check if a signal should be handled immediately (cannot be blocked/ignored)
process_control_to_signal
Convert Scarlet ProcessControlType to Linux signal
process_pending_signals_with_state
Process pending signals for a task with explicit signal state Returns true if a signal was handled and execution should be interrupted
setup_signal_handler 🔒
Enhanced signal handler setup with proper context saving
sys_rt_sigaction
Linux rt_sigaction system call implementation
sys_rt_sigprocmask
Linux rt_sigprocmask system call implementation
sys_tkill
Linux sys_tkill - Send a signal to a specific thread