63 #ifndef __INCLUDE_SIGNAL_H 64 #define __INCLUDE_SIGNAL_H 70 #include <tinyara/config.h> 71 #include <tinyara/compiler.h> 82 #define NULL_SIGNAL_SET ((sigset_t)0x00000000) 83 #define ALL_SIGNAL_SET ((sigset_t)0xffffffff) 86 #define GOOD_SIGNO(s) ((((unsigned)(s)) <= MAX_SIGNO)) 87 #define SIGNO2SET(s) ((sigset_t)1 << (s)) 91 #define SIGRTMIN MIN_SIGNO 92 #define SIGRTMAX MAX_SIGNO 104 #ifndef CONFIG_SIG_SIGUSR1 107 #define SIGUSR1 CONFIG_SIG_SIGUSR1 110 #ifndef CONFIG_SIG_SIGUSR2 113 #define SIGUSR2 CONFIG_SIG_SIGUSR2 116 #ifndef CONFIG_SIG_SIGALARM 120 #define SIGALRM CONFIG_SIG_SIGALARM 123 #ifdef CONFIG_SCHED_HAVE_PARENT 124 #ifndef CONFIG_SIG_SIGCHLD 127 #define SIGCHLD CONFIG_SIG_SIGCHLD 132 #ifndef CONFIG_SIG_POLL 135 #define SIGPOLL CONFIG_SIG_POLL 139 #ifndef CONFIG_SIG_SIGKILL 142 #define SIGKILL CONFIG_SIG_SIGKILL 147 #ifndef CONFIG_DISABLE_PTHREAD 148 #ifndef CONFIG_SIG_SIGCONDTIMEDOUT 149 #define SIGCONDTIMEDOUT 16 151 #define SIGCONDTIMEDOUT CONFIG_SIG_SIGCONDTIMEDOUT 157 #if defined(CONFIG_SCHED_WORKQUEUE) || defined(CONFIG_PAGING) 158 #ifndef CONFIG_SIG_SIGWORK 161 #define SIGWORK CONFIG_SIG_SIGWORK 166 #ifndef CONFIG_SIG_SIGTM_UNICAST 167 #define SIGTM_UNICAST 18 169 #define SIGTM_UNICAST CONFIG_SIG_SIGTM_UNICAST 173 #ifndef CONFIG_SIG_SIGTM_PAUSE 174 #define SIGTM_PAUSE 19 176 #define SIGTM_PAUSE CONFIG_SIG_SIGTM_PAUSE 180 #ifndef CONFIG_SIG_SIGTM_RESUME 181 #define SIGTM_RESUME 20 183 #define SIGTM_RESUME CONFIG_SIG_SIGTM_RESUME 187 #ifndef CONFIG_SIG_SIGTM_BROADCAST 188 #define SIGTM_BROADCAST 21 190 #define SIGTM_BROADCAST CONFIG_SIG_SIGTM_BROADCAST 194 #ifndef CONFIG_SIG_SIGEL_WAKEUP 195 #define SIGEL_WAKEUP 22 197 #define SIGEL_WAKEUP CONFIG_SIG_SIGEL_WAKEUP 201 #ifndef CONFIG_SIG_SIGTM_TERMINATION 202 #define SIGTM_TERMINATION 23 204 #define SIGTM_TERMINATION CONFIG_SIG_SIGTM_TERMINATION 208 #ifndef CONFIG_SIG_SIGEL_EVENT 209 #define SIGEL_EVENT 24 211 #define SIGEL_EVENT CONFIG_SIG_SIGEL_EVENT 217 #define SIG_UNBLOCK 2 218 #define SIG_SETMASK 3 222 #define SA_NOCLDSTOP (1 << 0) 224 #define SA_SIGINFO (1 << 1) 227 #define SA_NOCLDWAIT (1 << 2) 241 #define CLD_TRAPPED 8 242 #define CLD_STOPPED 9 243 #define CLD_CONTINUED 10 248 #define SIGEV_SIGNAL 1 252 #define SIG_ERR ((_sa_handler_t)-1) 253 #define SIG_DFL ((_sa_handler_t)0) 254 #define SIG_IGN ((_sa_handler_t)0) 255 #define SIG_HOLD ((_sa_handler_t)1) 257 #define COPY_SIGACTION(t, f) \ 259 (t)->sa_sigaction = (f)->sa_sigaction; \ 260 (t)->sa_mask = (f)->sa_mask; \ 261 (t)->sa_flags = (f)->sa_flags; \ 301 #ifdef CONFIG_SCHED_HAVE_PARENT 331 #define sa_handler sa_u._sa_handler 332 #define sa_sigaction sa_u._sa_sigaction 346 #define EXTERN extern "C" 349 #define EXTERN extern 359 int kill(pid_t pid,
int sig);
441 CODE void (*
sigset(
int sig, CODE
void (*func)(
int sig)))(
int sig);
448 CODE void (*
signal(
int sig, CODE
void (*func)(
int sig)))(
int sig);
515 #ifdef CONFIG_CAN_PASS_STRUCTS CODE void(* _sa_sigaction_t)(int, FAR siginfo_t *, FAR void *)
Union for defining the types of the siginfo si_value field.
int sigignore(int sig)
signal management
int sigaction(int sig, FAR const struct sigaction *act, FAR struct sigaction *oact)
examine and change a signal action
int sigpause(int sig)
signal management
int sigrelse(int sig)
signal management
CODE void(*)(int sig) sigset(int sig, CODE void(*func)(int sig))
signal management
int sigpending(FAR sigset_t *set)
examine pending signals
int sigfillset(FAR sigset_t *set)
initialize and fill a signal set
int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset)
examine and change blocked signals
Structure for using to pass parameters to/from signal handlers.
int sigemptyset(FAR sigset_t *set)
initialize and empty a signal set
int sigsuspend(FAR const sigset_t *sigmask)
wait for a signal
int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *value, FAR const struct timespec *timeout)
wait for queued signals
Structure for elements that define a queue signal. The following is used to attach a signal to a mess...
int sigwaitinfo(FAR const sigset_t *set, FAR struct siginfo *value)
wait for queued signals
int sighold(int sig)
signal management
_sa_handler_t _sa_handler
CODE void(*)(int sig) signal(int sig, CODE void(*func)(int sig))
signal management
int sigaddset(FAR sigset_t *set, int signo)
add a signal to a signal set
int kill(pid_t pid, int sig)
send a signal to a process or a group of processes
int sigdelset(FAR sigset_t *set, int signo)
delete a signal from a signal set
Structure for defining the action to take for given signal.
structure represents an elapsed time
CODE void(* _sa_handler_t)(int)
int sigqueue(int pid, int signo, union sigval value)
queue a signal to a process
int sigismember(FAR const sigset_t *set, int signo)
test for a signal in a signal set
_sa_sigaction_t _sa_sigaction