You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
#ifndef __SIGNAL_H__ |
|
# define __SIGNAL_H__ |
|
|
|
#ifdef __cplusplus |
|
extern "C" { |
|
#endif |
|
|
|
#include <stddef.h> |
|
#include <stdint.h> |
|
#include <stdatomic.h> |
|
|
|
/* C99 API. */ |
|
|
|
typedef volatile atomic_int sig_atomic_t; |
|
|
|
/* Type of a signal handler.*/ |
|
typedef void (*__sighandler_t)(int); |
|
|
|
#include <bits/signum.h> |
|
|
|
/* Set the handler for __signum. */ |
|
extern __sighandler_t signal(int __signum, __sighandler_t __handler); |
|
|
|
/* Raise signal __signum. */ |
|
extern int raise(int __signum); |
|
|
|
/* POSIX API (Vhex only). */ |
|
|
|
#ifdef _POSIX_C_SOURCE |
|
|
|
/* Type of signal set */ |
|
typedef uint32_t sigset_t; |
|
typedef uint32_t kernel_sigset_t; |
|
|
|
/* |
|
** Get the system-specific definitions of `struct sigaction' and the `SA_*' |
|
** and `SIG_*'. constants. |
|
*/ |
|
#include <bits/sigaction.h> |
|
#include <sys/types.h> |
|
|
|
/* Get and/or change the set of blocked signals. */ |
|
extern int sigprocmask (int __how, const sigset_t * __restrict__ __set, |
|
sigset_t * __restrict__ __oldset); |
|
|
|
/* |
|
** Send signal SIG to process number PID. If PID is zero, send SIG to all |
|
** processes in the current process's process group. If PID is < -1, send SIG to |
|
** all processes in process group - PID. |
|
*/ |
|
extern int kill(pid_t __pid, int __sig); |
|
|
|
#endif /*_POSIX_C_SOURCE*/ |
|
|
|
#ifdef __cplusplus |
|
} |
|
#endif |
|
|
|
#endif /*__SIGNAL_H__*/
|
|
|