Luna/libc/include/signal.h

59 lines
1.5 KiB
C
Raw Permalink Normal View History

2023-03-24 21:15:28 +00:00
/* signal.h: Signal management. */
#ifndef _SIGNAL_H
#define _SIGNAL_H
2023-07-10 17:46:57 +00:00
#include <bits/signal.h>
#include <sys/types.h>
2023-03-24 21:15:28 +00:00
typedef int sig_atomic_t;
2023-07-10 19:17:25 +00:00
#define SIG_ERR (__simple_sighandler_t)(-3)
2023-07-10 17:46:57 +00:00
#ifdef __cplusplus
extern "C"
{
#endif
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Wshadow"
/* Examine/change the current thread's signal disposition for a specific signal. */
int sigaction(int signo, const struct sigaction* act, struct sigaction* oldact);
#pragma GCC pop_options
2023-07-10 19:17:25 +00:00
/* Change the current thread's signal disposition for a specific signal. */
__simple_sighandler_t signal(int signo, __simple_sighandler_t handler);
2023-07-10 17:46:57 +00:00
/* Send a signal to a specific process. */
int kill(pid_t pid, int signo);
/* Send a signal to the current thread. */
int raise(int signo);
/* Modify the current thread's signal mask. */
int sigprocmask(int how, const sigset_t* set, sigset_t* oldset);
/* Clear all signals from set. */
int sigemptyset(sigset_t* set);
/* Add all signals to set. */
int sigfillset(sigset_t* set);
/* Add a specific signal to set. */
int sigaddset(sigset_t* set, int signo);
/* Remove a specific signal from set. */
int sigdelset(sigset_t* set, int signo);
/* Check if a signal is in set.*/
int sigismember(const sigset_t* set, int signo);
/* Change the signal mask temporarily and wait for a signal to arrive. */
int sigsuspend(const sigset_t* set);
2023-07-10 17:46:57 +00:00
#ifdef __cplusplus
}
#endif
2023-03-24 21:15:28 +00:00
#endif