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 63 of file signal.c.
Referenced by DEFINE_SYSCALL(), DEFINE_SYSCALL(), invalid_page_fault(), ksyscall_enter(), pipe_write(), process_do_execveat(), process_handle_exit(), 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 93 of file signal.c.
Referenced by DEFINE_SYSCALL(), and process_handle_exit().
void signal_exit_to_user_prepare | ( | platform_regs_t * | regs | ) |
Prepare to exit to userspace.
regs | The registers of the thread. |
Definition at line 212 of file signal.c.
Referenced by invalid_page_fault(), 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 228 of file signal.c.
Referenced by x86_interrupt_entry().
void signal_on_returned | ( | sigreturn_data_t * | supplimentary_data | ) |
Return from a signal handler.
Definition at line 262 of file signal.c.
Referenced by platform_restore_from_signal_handler().
Return true if there's a pending signal.
Definition at line 268 of file signal.c.
Referenced by console_io_read(), ipc_connect_to_server(), ipc_server_accept(), and process_wait_for_pid().
|
extern |
Definition at line 18 of file signal.c.
Referenced by process_do_fork(), and signal_send_to_thread().