![]() |
Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
|
#include <sys/types.h>

Go to the source code of this file.
Data Structures | |
| union | sigval |
| struct | siginfo_t |
| struct | sigaction |
| struct | sigevent |
Typedefs | |
| typedef uint32_t | sigset_t |
| typedef void(* | sa_handler_t) (int) |
| typedef void(* | sa_sigaction_t) (int, siginfo_t *, void *) |
Functions | |
| int | sigemptyset (sigset_t *set) |
| Initialize the signal set given by set to empty, with all signals excluded from the set. More... | |
| int | sigfillset (sigset_t *set) |
| Initialize the signal set to full, including all signals. More... | |
| int | sigaddset (sigset_t *set, int signum) |
| Add a signal into the set. More... | |
| int | sigdelset (sigset_t *set, int signum) |
| Delete a signal from the set. More... | |
| int | sigismember (const sigset_t *set, int signum) |
| Test whether sugnum is a member of the set. More... | |
| sa_handler_t | signal (int signum, sa_handler_t handler) |
| Set up a handler for a signal, the older way POSIX keeps. More... | |
| 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 the old one reads back empty. More... | |
| 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 and this always fails with EINTR. More... | |
| int | sigaction (int signum, const struct sigaction *act, struct sigaction *oldact) |
| Set up a signal for the task to catch. More... | |
| 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 pending. More... | |
| int | sigwaitinfo (const sigset_t *set, siginfo_t *info) |
| Wait for a signal and return siginfo. More... | |
| int | sigtimedwait (const sigset_t *set, siginfo_t *info, const struct timespec *timeout) |
| Wait for a signal with timeout. More... | |
| int | pause (void) |
| To cause the calling task (or thread) to sleep until a signal is delivered that either terminate the task or cause the invocation of a signal-catching function. More... | |
| int | kill (pid_t pid, int sig) |
| Send a signal to a task. More... | |
| int | raise (int sig) |
| Send a signal to the calling task. More... | |
| int kill | ( | pid_t | pid, |
| int | sig | ||
| ) |
Send a signal to a task.
| pid | The task ID to provide. |
| sig | The signal number to provide. |
| int | 0 on success and nonzero error number on error. |
| int pause | ( | void | ) |
To cause the calling task (or thread) to sleep until a signal is delivered that either terminate the task or cause the invocation of a signal-catching function.
| int | 0 on success and nonzero error number on error. |
| int raise | ( | int | sig | ) |
Send a signal to the calling task.
| sig | The signal number to provide. |
| int | 0 on success and nonzero error number on error. |
Set up a signal for the task to catch.
| signum | The number of the signal to attach. |
| act | Pointer of the new action setting. |
| oldact | For preserving old action. |
| int | 0 on success and nonzero error number on error. |
| int sigaddset | ( | sigset_t * | set, |
| int | signum | ||
| ) |
Add a signal into the set.
| set | Pointer to the signal set. |
| signum | The number of the signal to add into the set. |
| int | 0 on success and nonzero error number on error. |
| int sigdelset | ( | sigset_t * | set, |
| int | signum | ||
| ) |
Delete a signal from the set.
| set | Pointer to the signal set |
| signum | The number of the signal to delete from the set |
| int | 0 on success and nonzero error number on error. |
| int sigemptyset | ( | sigset_t * | set | ) |
Initialize the signal set given by set to empty, with all signals excluded from the set.
| set | Pointer to the signal set. |
| int | 0 on success and nonzero error number on error. |
| int sigfillset | ( | sigset_t * | set | ) |
Initialize the signal set to full, including all signals.
| set | Pointer to the signal set. |
| int | 0 on success and nonzero error number on error. |
| int sigismember | ( | const sigset_t * | set, |
| int | signum | ||
| ) |
Test whether sugnum is a member of the set.
| set | Pointer to the signal set. |
| signum | The number of the signal to check. |
| int | 0 on success and nonzero error number on error. |
| sa_handler_t signal | ( | int | signum, |
| sa_handler_t | handler | ||
| ) |
Set up a handler for a signal, the older way POSIX keeps.
| signum | The number of the signal to attach. |
| handler | The function to call, SIG_DFL or SIG_IGN. |
| sa_handler_t | The handler that was in place, and SIG_ERR on error. |
| 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 the old one reads back empty.
| how | SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK. |
| set | The set to apply. |
| oldset | For returning the set that was in place. |
| int | 0 on success and -1 on error, with the reason left in errno. |
| 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 and this always fails with EINTR.
| mask | The signals to leave blocked while waiting. |
| int | Always -1, with the reason left in errno. |
Wait for a signal with timeout.
| set | Pointer to the signal set. |
| info | For returning signal info (optional). |
| timeout | Relative timeout. |
| int | The signal number on success and nonzero error number on error. |
| 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 pending.
| set | Pointer to the signal set. |
| sig | For returning the caught signal. |
| int | 0 on success and nonzero error number on error. |
| int sigwaitinfo | ( | const sigset_t * | set, |
| siginfo_t * | info | ||
| ) |
Wait for a signal and return siginfo.
| set | Pointer to the signal set. |
| info | For returning signal info (optional). |
| int | The signal number on success and nonzero error number on error. |