fxlibc/include/signal.h

41 lines
1.1 KiB
C
Raw Normal View History

2020-09-17 19:27:01 +02:00
#ifndef __LIB_SIGNAL_H__
# define __LIB_SIGNAL_H__
#include <stddef.h>
#include <stdint.h>
2021-05-09 16:35:40 +02:00
#include <bits/signum.h>
2020-09-17 19:27:01 +02:00
/* Type of signal set */
typedef uint32_t sigset_t;
typedef uint32_t kernel_sigset_t;
/* Type of a signal handler.*/
2020-09-17 19:27:01 +02:00
typedef void (*__sighandler_t)(int);
typedef __sighandler_t sighandler_t;
/*
** Get the system-specific definitions of `struct sigaction' and the `SA_*'
** and `SIG_*'. constants.
*/
#include <bits/sigaction.h>
2020-09-17 19:27:01 +02:00
/* Get and/or change the set of blocked signals. */
2021-05-09 16:35:40 +02:00
extern int sigprocmask (int how, const sigset_t *restrict set,
sigset_t *restrict oldset);
2020-09-17 19:27:01 +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.
*/
2020-09-17 19:27:01 +02:00
extern int kill(pid_t pid, int sig);
/*
** Set the handler for the signal SIG to HANDLER, returning the old handler, or
** SIG_ERR on error. By default `signal' has the BSD semantic.
*/
2020-09-17 19:27:01 +02:00
extern void (*signal(int signum, void (*handler)(int)))(int);
#endif /*__LIB_SIGNAL_H__*/