/* SPDX-License-Identifier: GPL-2.0 */ /** \file signal.h exported symbols from signal.c */ /** * Task for signal handling. */ struct signal_task { /** The read end of the signal pipe. */ int fd; /** The associated task structure. */ struct task *task; }; /** * Monitor the signal fd for reading. * * \param s The scheduler instance. * \param context Signal task pointer. * * This convenience helper is called from several programs which need to handle * signals, including para_server and para_audiod. These programs set up a * signal pipe and a signal task structure, and use this function to tell the * scheduler to monitor the read end of the pipe. * * Although the second parameter must be in fact a pointer to a signal_task * structure, the parameter is specified as void * here to match the signature * declared in struct \ref task_info. */ _static_inline_ void signal_pre_monitor(struct sched *s, void *context) { struct signal_task *st = context; sched_monitor_readfd(st->fd, s); } int signal_init(void); void para_sigaction(int sig, void (*handler)(int)); void para_install_sighandler(int); int para_next_signal(void); void para_block_signal(int sig); void para_unblock_signal(int sig);