48 #define SIG_DFL ((void (*)(int)) 0)
49 #define SIG_IGN ((void (*)(int)) 1)
50 #define SIG_ERR ((void (*)(int)) - 1)
56 #define SA_SIGINFO 0x2
57 #define SA_RESTART 0x10000000
58 #define SA_NOCLDSTOP 0x00000001
61 #define SIGEV_SIGNAL 2
63 typedef uint32_t sigset_t;
78 void (*sa_handler)(int);
79 void (*sa_sigaction)(int,
siginfo_t *,
void *);
85 typedef void (*sa_handler_t)(int);
86 typedef void (*sa_sigaction_t)(int,
siginfo_t *,
void *);
92 void (*sigev_notify_function)(
union sigval);
93 void *sigev_notify_attributes;
94 pid_t sigev_notify_thread_id;
118 int sigaddset(sigset_t *set,
int signum);
126 int sigdelset(sigset_t *set,
int signum);
142 sa_handler_t
signal(
int signum, sa_handler_t handler);
152 int sigprocmask(
int how,
const sigset_t *set, sigset_t *oldset);
180 int sigwait(
const sigset_t *set,
int *sig);
215 int kill(pid_t pid,
int sig);
int sigwaitinfo(const sigset_t *set, siginfo_t *info)
Wait for a signal and return siginfo.
Definition: signal.c:146
sa_handler_t signal(int signum, sa_handler_t handler)
Set up a handler for a signal, the older way POSIX keeps.
Definition: signal_posix.c:6
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
Read and replace the set of signals the thread blocks. Tenok blocks none, so the set is accepted and ...
Definition: signal_posix.c:20
int kill(pid_t pid, int sig)
Send a signal to a task.
Definition: signal.c:189
int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout)
Wait for a signal with timeout.
Definition: signal.c:158
int pause(void)
To cause the calling task (or thread) to sleep until a signal is delivered that either terminate the ...
Definition: signal.c:165
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
Set up a signal for the task to catch.
Definition: signal.c:126
int sigemptyset(sigset_t *set)
Initialize the signal set given by set to empty, with all signals excluded from the set.
Definition: signal.c:63
int sigismember(const sigset_t *set, int signum)
Test whether sugnum is a member of the set.
Definition: signal.c:107
int sigfillset(sigset_t *set)
Initialize the signal set to full, including all signals.
Definition: signal.c:72
int sigdelset(sigset_t *set, int signum)
Delete a signal from the set.
Definition: signal.c:94
int sigwait(const sigset_t *set, int *sig)
Suspend execution of the calling task until one of the signals specified in the signal set becomes pe...
Definition: signal.c:136
int sigaddset(sigset_t *set, int signum)
Add a signal into the set.
Definition: signal.c:81
int sigsuspend(const sigset_t *mask)
Wait for a signal that is not in the mask. Tenok blocks no signal, so there is never one to wait for ...
Definition: signal_posix.c:29