MOS Source Code
Loading...
Searching...
No Matches

Signal handling. More...

+ Collaboration diagram for kernel.tasks.signal:

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_tsigpending_slab
 

Detailed Description

Signal handling.

Function Documentation

◆ signal_send_to_thread()

long signal_send_to_thread ( thread_t * target,
signal_t signal )

Send a signal to a thread.

Parameters
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().

+ Here is the call graph for this function:

◆ signal_send_to_process()

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.

Parameters
target
signal

Definition at line 93 of file signal.c.

Referenced by DEFINE_SYSCALL(), and process_handle_exit().

+ Here is the call graph for this function:

◆ signal_exit_to_user_prepare()

void signal_exit_to_user_prepare ( platform_regs_t * regs)

Prepare to exit to userspace.

Parameters
regsThe 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().

+ Here is the call graph for this function:

◆ signal_exit_to_user_prepare_syscall()

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.

Parameters
regsThe registers of the thread.
syscall_nrThe syscall number, used in case the syscall should be restarted.
syscall_retThe 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().

+ Here is the call graph for this function:

◆ signal_on_returned()

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().

◆ signal_has_pending()

bool signal_has_pending ( void )

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().

+ Here is the call graph for this function:

Variable Documentation

◆ sigpending_slab

slab_t* sigpending_slab
extern

Definition at line 18 of file signal.c.

Referenced by process_do_fork(), and signal_send_to_thread().