2021-05-09 23:00:11 +02:00
|
|
|
#ifndef __SIGNAL_H__
|
|
|
|
# define __SIGNAL_H__
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2021-06-28 15:49:05 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-09-17 19:27:01 +02:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2021-05-29 18:26:33 +02:00
|
|
|
|
|
|
|
/* C99 API. */
|
|
|
|
|
2022-08-12 22:46:56 +02:00
|
|
|
typedef int sig_atomic_t;
|
2021-05-29 18:26:33 +02:00
|
|
|
|
|
|
|
/* Type of a signal handler.*/
|
|
|
|
typedef void (*__sighandler_t)(int);
|
2020-11-03 15:15:01 +01:00
|
|
|
|
2021-05-09 16:35:40 +02:00
|
|
|
#include <bits/signum.h>
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2021-05-29 18:26:33 +02:00
|
|
|
/* 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
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* 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>
|
2021-05-29 18:26:33 +02:00
|
|
|
#include <sys/types.h>
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* Get and/or change the set of blocked signals. */
|
2021-06-13 16:51:47 +02:00
|
|
|
extern int sigprocmask (int __how, const sigset_t * __restrict__ __set,
|
|
|
|
sigset_t * __restrict__ __oldset);
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/*
|
|
|
|
** 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.
|
|
|
|
*/
|
2021-05-29 18:26:33 +02:00
|
|
|
extern int kill(pid_t __pid, int __sig);
|
2020-10-14 11:45:08 +02:00
|
|
|
|
2021-05-29 18:26:33 +02:00
|
|
|
#endif /*_POSIX_C_SOURCE*/
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2021-06-28 15:49:05 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2021-05-09 23:00:11 +02:00
|
|
|
#endif /*__SIGNAL_H__*/
|