MOS Source Code
|
Signal handling. More...
Classes | |
struct | sigpending_t |
A pending signal. More... | |
struct | sigreturn_data_t |
Functions | |
long | signal_send_to_thread (thread_t *target, signal_t signal) |
Send a signal to a thread. | |
long | signal_send_to_process (process_t *target, signal_t signal) |
Send a signal to a process, an arbitrary thread will be chosen to receive the signal. | |
void | signal_exit_to_user_prepare (platform_regs_t *regs) |
Prepare to exit to userspace. | |
void | signal_exit_to_user_prepare_syscall (platform_regs_t *regs, reg_t syscall_nr, reg_t syscall_ret) |
Prepare to exit to userspace after a syscall. | |
void | signal_on_returned (sigreturn_data_t *supplimentary_data) |
Return from a signal handler. | |
bool | signal_has_pending (void) |
Return true if there's a pending signal. | |
Variables | |
slab_t * | sigpending_slab |
Signal handling.
Send a signal to a thread.
target | |
signal |
Definition at line 92 of file signal.c.
Referenced by console_putc(), invalid_page_fault(), io_poll(), ksyscall_enter(), MOS_STATIC_ASSERT(), pipe_write(), process_do_execveat(), process_exit(), riscv64_trap_handler(), signal_send_to_process(), and x86_handle_exception().
Send a signal to a process, an arbitrary thread will be chosen to receive the signal.
target | |
signal |
Definition at line 126 of file signal.c.
Referenced by MOS_STATIC_ASSERT(), process_exit(), and riscv64_trap_handler().
void signal_exit_to_user_prepare | ( | platform_regs_t * | regs | ) |
Prepare to exit to userspace.
regs | The registers of the thread. |
Definition at line 245 of file signal.c.
Referenced by invalid_page_fault(), riscv64_start_user_thread(), riscv64_trap_handler(), x86_interrupt_entry(), and x86_start_user_thread().
void signal_exit_to_user_prepare_syscall | ( | platform_regs_t * | regs, |
reg_t | syscall_nr, | ||
reg_t | syscall_ret ) |
Prepare to exit to userspace after a syscall.
regs | The registers of the thread. |
syscall_nr | The syscall number, used in case the syscall should be restarted. |
syscall_ret | The return value of the syscall, which may be -ERESTARTSYS, in which case the syscall should be restarted. |
Definition at line 261 of file signal.c.
Referenced by riscv64_trap_handler(), and x86_interrupt_entry().
void signal_on_returned | ( | sigreturn_data_t * | supplimentary_data | ) |
Return from a signal handler.
Definition at line 295 of file signal.c.
Referenced by platform_restore_from_signal_handler().
Return true if there's a pending signal.
Definition at line 301 of file signal.c.
Referenced by console_io_read(), ipc_connect_to_server(), ipc_server_accept(), pipe_read(), pipe_write(), process_wait_for_pid(), and timer_msleep().
|
extern |
Definition at line 50 of file signal.c.
Referenced by process_do_fork(), and signal_send_to_thread().