2011-02-12 05:22:29 +00:00
|
|
|
#ifndef _SIGNAL_H
|
|
|
|
#define _SIGNAL_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-09-08 03:13:55 +00:00
|
|
|
#include <features.h>
|
2012-09-07 02:44:55 +00:00
|
|
|
|
2011-02-15 01:33:54 +00:00
|
|
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
2012-05-23 01:52:08 +00:00
|
|
|
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
|
|
|
|| defined(_BSD_SOURCE)
|
2011-02-15 01:33:54 +00:00
|
|
|
|
2011-09-20 14:58:18 +00:00
|
|
|
#ifdef _GNU_SOURCE
|
2012-11-26 04:04:23 +00:00
|
|
|
#define __ucontext ucontext
|
2011-09-20 14:58:18 +00:00
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#define __NEED_size_t
|
|
|
|
#define __NEED_pid_t
|
|
|
|
#define __NEED_uid_t
|
|
|
|
#define __NEED_struct_timespec
|
|
|
|
#define __NEED_pthread_t
|
2011-03-29 17:01:25 +00:00
|
|
|
#define __NEED_pthread_attr_t
|
2011-02-12 05:22:29 +00:00
|
|
|
#define __NEED_time_t
|
|
|
|
#define __NEED_clock_t
|
|
|
|
#define __NEED_sigset_t
|
|
|
|
|
|
|
|
#include <bits/alltypes.h>
|
|
|
|
|
2011-09-20 00:02:12 +00:00
|
|
|
#define SIG_BLOCK 0
|
|
|
|
#define SIG_UNBLOCK 1
|
|
|
|
#define SIG_SETMASK 2
|
|
|
|
|
|
|
|
#define SI_ASYNCNL (-60)
|
|
|
|
#define SI_TKILL (-6)
|
|
|
|
#define SI_SIGIO (-5)
|
|
|
|
#define SI_ASYNCIO (-4)
|
|
|
|
#define SI_MESGQ (-3)
|
|
|
|
#define SI_TIMER (-2)
|
|
|
|
#define SI_QUEUE (-1)
|
|
|
|
#define SI_USER 0
|
|
|
|
#define SI_KERNEL 128
|
|
|
|
|
2016-01-27 00:40:32 +00:00
|
|
|
typedef struct sigaltstack stack_t;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <bits/signal.h>
|
|
|
|
|
|
|
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
|
|
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
|
|
|
|| defined(_BSD_SOURCE)
|
|
|
|
|
|
|
|
#define SIG_HOLD ((void (*)(int)) 2)
|
|
|
|
|
2011-09-20 00:02:12 +00:00
|
|
|
#define FPE_INTDIV 1
|
|
|
|
#define FPE_INTOVF 2
|
|
|
|
#define FPE_FLTDIV 3
|
|
|
|
#define FPE_FLTOVF 4
|
2012-01-25 20:30:42 +00:00
|
|
|
#define FPE_FLTUND 5
|
2011-09-20 00:02:12 +00:00
|
|
|
#define FPE_FLTRES 6
|
|
|
|
#define FPE_FLTINV 7
|
|
|
|
#define FPE_FLTSUB 8
|
|
|
|
|
|
|
|
#define ILL_ILLOPC 1
|
|
|
|
#define ILL_ILLOPN 2
|
|
|
|
#define ILL_ILLADR 3
|
|
|
|
#define ILL_ILLTRP 4
|
|
|
|
#define ILL_PRVOPC 5
|
|
|
|
#define ILL_PRVREG 6
|
|
|
|
#define ILL_COPROC 7
|
|
|
|
#define ILL_BADSTK 8
|
|
|
|
|
|
|
|
#define SEGV_MAPERR 1
|
|
|
|
#define SEGV_ACCERR 2
|
2015-03-04 19:37:33 +00:00
|
|
|
#define SEGV_BNDERR 3
|
2016-05-26 20:06:10 +00:00
|
|
|
#define SEGV_PKUERR 4
|
2011-09-20 00:02:12 +00:00
|
|
|
|
|
|
|
#define BUS_ADRALN 1
|
|
|
|
#define BUS_ADRERR 2
|
|
|
|
#define BUS_OBJERR 3
|
2013-07-24 23:56:13 +00:00
|
|
|
#define BUS_MCEERR_AR 4
|
|
|
|
#define BUS_MCEERR_AO 5
|
2011-09-20 00:02:12 +00:00
|
|
|
|
|
|
|
#define CLD_EXITED 1
|
|
|
|
#define CLD_KILLED 2
|
|
|
|
#define CLD_DUMPED 3
|
|
|
|
#define CLD_TRAPPED 4
|
|
|
|
#define CLD_STOPPED 5
|
|
|
|
#define CLD_CONTINUED 6
|
|
|
|
|
2011-03-29 17:01:25 +00:00
|
|
|
union sigval {
|
2011-02-12 05:22:29 +00:00
|
|
|
int sival_int;
|
|
|
|
void *sival_ptr;
|
|
|
|
};
|
|
|
|
|
refactor headers, especially alltypes.h, and improve C++ ABI compat
the arch-specific bits/alltypes.h.sh has been replaced with a generic
alltypes.h.in and minimal arch-specific bits/alltypes.h.in.
this commit is intended to have no functional changes except:
- exposing additional symbols that POSIX allows but does not require
- changing the C++ name mangling for some types
- fixing the signedness of blksize_t on powerpc (POSIX requires signed)
- fixing the limit macros for sig_atomic_t on x86_64
- making dev_t an unsigned type (ABI matching goal, and more logical)
in addition, some types that were wrongly defined with long on 32-bit
archs were changed to int, and vice versa; this change is
non-functional except for the possibility of making pointer types
mismatch, and only affects programs that were using them incorrectly,
and only at build-time, not runtime.
the following changes were made in the interest of moving
non-arch-specific types out of the alltypes system and into the
headers they're associated with, and also will tend to improve
application compatibility:
- netdb.h now includes netinet/in.h (for socklen_t and uint32_t)
- netinet/in.h now includes sys/socket.h and inttypes.h
- sys/resource.h now includes sys/time.h (for struct timeval)
- sys/wait.h now includes signal.h (for siginfo_t)
- langinfo.h now includes nl_types.h (for nl_item)
for the types in stdint.h:
- types which are of no interest to other headers were moved out of
the alltypes system.
- fast types for 8- and 64-bit are hard-coded (at least for now); only
the 16- and 32-bit ones have reason to vary by arch.
and the following types have been changed for C++ ABI purposes;
- mbstate_t now has a struct tag, __mbstate_t
- FILE's struct tag has been changed to _IO_FILE
- DIR's struct tag has been changed to __dirstream
- locale_t's struct tag has been changed to __locale_struct
- pthread_t is defined as unsigned long in C++ mode only
- fpos_t now has a struct tag, _G_fpos64_t
- fsid_t's struct tag has been changed to __fsid_t
- idtype_t has been made an enum type (also required by POSIX)
- nl_catd has been changed from long to void *
- siginfo_t's struct tag has been removed
- sigset_t's has been given a struct tag, __sigset_t
- stack_t has been given a struct tag, sigaltstack
- suseconds_t has been changed to long on 32-bit archs
- [u]intptr_t have been changed from long to int rank on 32-bit archs
- dev_t has been made unsigned
summary of tests that have been performed against these changes:
- nsz's libc-test (diff -u before and after)
- C++ ABI check symbol dump (diff -u before, after, glibc)
- grepped for __NEED, made sure types needed are still in alltypes
- built gcc 3.4.6
2013-07-22 15:22:36 +00:00
|
|
|
typedef struct {
|
2016-01-27 00:54:25 +00:00
|
|
|
#ifdef __SI_SWAP_ERRNO_CODE
|
|
|
|
int si_signo, si_code, si_errno;
|
|
|
|
#else
|
2011-09-20 00:02:12 +00:00
|
|
|
int si_signo, si_errno, si_code;
|
2016-01-27 00:54:25 +00:00
|
|
|
#endif
|
2011-09-20 00:02:12 +00:00
|
|
|
union {
|
2013-03-04 22:05:45 +00:00
|
|
|
char __pad[128 - 2*sizeof(int) - sizeof(long)];
|
2011-09-20 00:02:12 +00:00
|
|
|
struct {
|
2014-05-25 00:39:46 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
pid_t si_pid;
|
|
|
|
uid_t si_uid;
|
|
|
|
} __piduid;
|
|
|
|
struct {
|
|
|
|
int si_timerid;
|
|
|
|
int si_overrun;
|
|
|
|
} __timer;
|
|
|
|
} __first;
|
|
|
|
union {
|
|
|
|
union sigval si_value;
|
|
|
|
struct {
|
|
|
|
int si_status;
|
|
|
|
clock_t si_utime, si_stime;
|
|
|
|
} __sigchld;
|
|
|
|
} __second;
|
|
|
|
} __si_common;
|
2011-09-20 00:02:12 +00:00
|
|
|
struct {
|
|
|
|
void *si_addr;
|
2013-07-25 03:17:21 +00:00
|
|
|
short si_addr_lsb;
|
2016-05-26 20:06:10 +00:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
void *si_lower;
|
|
|
|
void *si_upper;
|
|
|
|
} __addr_bnd;
|
|
|
|
unsigned si_pkey;
|
|
|
|
} __first;
|
2011-09-20 00:02:12 +00:00
|
|
|
} __sigfault;
|
|
|
|
struct {
|
|
|
|
long si_band;
|
|
|
|
int si_fd;
|
|
|
|
} __sigpoll;
|
2013-07-24 23:56:13 +00:00
|
|
|
struct {
|
2013-07-25 03:17:21 +00:00
|
|
|
void *si_call_addr;
|
2013-07-24 23:56:13 +00:00
|
|
|
int si_syscall;
|
2013-07-25 03:17:21 +00:00
|
|
|
unsigned si_arch;
|
2013-07-24 23:56:13 +00:00
|
|
|
} __sigsys;
|
2011-09-20 00:02:12 +00:00
|
|
|
} __si_fields;
|
refactor headers, especially alltypes.h, and improve C++ ABI compat
the arch-specific bits/alltypes.h.sh has been replaced with a generic
alltypes.h.in and minimal arch-specific bits/alltypes.h.in.
this commit is intended to have no functional changes except:
- exposing additional symbols that POSIX allows but does not require
- changing the C++ name mangling for some types
- fixing the signedness of blksize_t on powerpc (POSIX requires signed)
- fixing the limit macros for sig_atomic_t on x86_64
- making dev_t an unsigned type (ABI matching goal, and more logical)
in addition, some types that were wrongly defined with long on 32-bit
archs were changed to int, and vice versa; this change is
non-functional except for the possibility of making pointer types
mismatch, and only affects programs that were using them incorrectly,
and only at build-time, not runtime.
the following changes were made in the interest of moving
non-arch-specific types out of the alltypes system and into the
headers they're associated with, and also will tend to improve
application compatibility:
- netdb.h now includes netinet/in.h (for socklen_t and uint32_t)
- netinet/in.h now includes sys/socket.h and inttypes.h
- sys/resource.h now includes sys/time.h (for struct timeval)
- sys/wait.h now includes signal.h (for siginfo_t)
- langinfo.h now includes nl_types.h (for nl_item)
for the types in stdint.h:
- types which are of no interest to other headers were moved out of
the alltypes system.
- fast types for 8- and 64-bit are hard-coded (at least for now); only
the 16- and 32-bit ones have reason to vary by arch.
and the following types have been changed for C++ ABI purposes;
- mbstate_t now has a struct tag, __mbstate_t
- FILE's struct tag has been changed to _IO_FILE
- DIR's struct tag has been changed to __dirstream
- locale_t's struct tag has been changed to __locale_struct
- pthread_t is defined as unsigned long in C++ mode only
- fpos_t now has a struct tag, _G_fpos64_t
- fsid_t's struct tag has been changed to __fsid_t
- idtype_t has been made an enum type (also required by POSIX)
- nl_catd has been changed from long to void *
- siginfo_t's struct tag has been removed
- sigset_t's has been given a struct tag, __sigset_t
- stack_t has been given a struct tag, sigaltstack
- suseconds_t has been changed to long on 32-bit archs
- [u]intptr_t have been changed from long to int rank on 32-bit archs
- dev_t has been made unsigned
summary of tests that have been performed against these changes:
- nsz's libc-test (diff -u before and after)
- C++ ABI check symbol dump (diff -u before, after, glibc)
- grepped for __NEED, made sure types needed are still in alltypes
- built gcc 3.4.6
2013-07-22 15:22:36 +00:00
|
|
|
} siginfo_t;
|
2014-05-25 00:39:46 +00:00
|
|
|
#define si_pid __si_fields.__si_common.__first.__piduid.si_pid
|
|
|
|
#define si_uid __si_fields.__si_common.__first.__piduid.si_uid
|
|
|
|
#define si_status __si_fields.__si_common.__second.__sigchld.si_status
|
|
|
|
#define si_utime __si_fields.__si_common.__second.__sigchld.si_utime
|
|
|
|
#define si_stime __si_fields.__si_common.__second.__sigchld.si_stime
|
|
|
|
#define si_value __si_fields.__si_common.__second.si_value
|
2011-09-20 00:02:12 +00:00
|
|
|
#define si_addr __si_fields.__sigfault.si_addr
|
2013-07-24 23:56:13 +00:00
|
|
|
#define si_addr_lsb __si_fields.__sigfault.si_addr_lsb
|
2016-05-26 20:06:10 +00:00
|
|
|
#define si_lower __si_fields.__sigfault.__first.__addr_bnd.si_lower
|
|
|
|
#define si_upper __si_fields.__sigfault.__first.__addr_bnd.si_upper
|
|
|
|
#define si_pkey __si_fields.__sigfault.__first.si_pkey
|
2011-09-20 00:02:12 +00:00
|
|
|
#define si_band __si_fields.__sigpoll.si_band
|
|
|
|
#define si_fd __si_fields.__sigpoll.si_fd
|
2014-05-25 00:39:46 +00:00
|
|
|
#define si_timerid __si_fields.__si_common.__first.__timer.si_timerid
|
|
|
|
#define si_overrun __si_fields.__si_common.__first.__timer.si_overrun
|
|
|
|
#define si_ptr si_value.sival_ptr
|
|
|
|
#define si_int si_value.sival_int
|
2013-07-24 23:56:13 +00:00
|
|
|
#define si_call_addr __si_fields.__sigsys.si_call_addr
|
|
|
|
#define si_syscall __si_fields.__sigsys.si_syscall
|
|
|
|
#define si_arch __si_fields.__sigsys.si_arch
|
2011-09-20 00:02:12 +00:00
|
|
|
|
refactor headers, especially alltypes.h, and improve C++ ABI compat
the arch-specific bits/alltypes.h.sh has been replaced with a generic
alltypes.h.in and minimal arch-specific bits/alltypes.h.in.
this commit is intended to have no functional changes except:
- exposing additional symbols that POSIX allows but does not require
- changing the C++ name mangling for some types
- fixing the signedness of blksize_t on powerpc (POSIX requires signed)
- fixing the limit macros for sig_atomic_t on x86_64
- making dev_t an unsigned type (ABI matching goal, and more logical)
in addition, some types that were wrongly defined with long on 32-bit
archs were changed to int, and vice versa; this change is
non-functional except for the possibility of making pointer types
mismatch, and only affects programs that were using them incorrectly,
and only at build-time, not runtime.
the following changes were made in the interest of moving
non-arch-specific types out of the alltypes system and into the
headers they're associated with, and also will tend to improve
application compatibility:
- netdb.h now includes netinet/in.h (for socklen_t and uint32_t)
- netinet/in.h now includes sys/socket.h and inttypes.h
- sys/resource.h now includes sys/time.h (for struct timeval)
- sys/wait.h now includes signal.h (for siginfo_t)
- langinfo.h now includes nl_types.h (for nl_item)
for the types in stdint.h:
- types which are of no interest to other headers were moved out of
the alltypes system.
- fast types for 8- and 64-bit are hard-coded (at least for now); only
the 16- and 32-bit ones have reason to vary by arch.
and the following types have been changed for C++ ABI purposes;
- mbstate_t now has a struct tag, __mbstate_t
- FILE's struct tag has been changed to _IO_FILE
- DIR's struct tag has been changed to __dirstream
- locale_t's struct tag has been changed to __locale_struct
- pthread_t is defined as unsigned long in C++ mode only
- fpos_t now has a struct tag, _G_fpos64_t
- fsid_t's struct tag has been changed to __fsid_t
- idtype_t has been made an enum type (also required by POSIX)
- nl_catd has been changed from long to void *
- siginfo_t's struct tag has been removed
- sigset_t's has been given a struct tag, __sigset_t
- stack_t has been given a struct tag, sigaltstack
- suseconds_t has been changed to long on 32-bit archs
- [u]intptr_t have been changed from long to int rank on 32-bit archs
- dev_t has been made unsigned
summary of tests that have been performed against these changes:
- nsz's libc-test (diff -u before and after)
- C++ ABI check symbol dump (diff -u before, after, glibc)
- grepped for __NEED, made sure types needed are still in alltypes
- built gcc 3.4.6
2013-07-22 15:22:36 +00:00
|
|
|
struct sigaction {
|
|
|
|
union {
|
|
|
|
void (*sa_handler)(int);
|
|
|
|
void (*sa_sigaction)(int, siginfo_t *, void *);
|
|
|
|
} __sa_handler;
|
|
|
|
sigset_t sa_mask;
|
|
|
|
int sa_flags;
|
2013-07-24 23:56:13 +00:00
|
|
|
void (*sa_restorer)(void);
|
refactor headers, especially alltypes.h, and improve C++ ABI compat
the arch-specific bits/alltypes.h.sh has been replaced with a generic
alltypes.h.in and minimal arch-specific bits/alltypes.h.in.
this commit is intended to have no functional changes except:
- exposing additional symbols that POSIX allows but does not require
- changing the C++ name mangling for some types
- fixing the signedness of blksize_t on powerpc (POSIX requires signed)
- fixing the limit macros for sig_atomic_t on x86_64
- making dev_t an unsigned type (ABI matching goal, and more logical)
in addition, some types that were wrongly defined with long on 32-bit
archs were changed to int, and vice versa; this change is
non-functional except for the possibility of making pointer types
mismatch, and only affects programs that were using them incorrectly,
and only at build-time, not runtime.
the following changes were made in the interest of moving
non-arch-specific types out of the alltypes system and into the
headers they're associated with, and also will tend to improve
application compatibility:
- netdb.h now includes netinet/in.h (for socklen_t and uint32_t)
- netinet/in.h now includes sys/socket.h and inttypes.h
- sys/resource.h now includes sys/time.h (for struct timeval)
- sys/wait.h now includes signal.h (for siginfo_t)
- langinfo.h now includes nl_types.h (for nl_item)
for the types in stdint.h:
- types which are of no interest to other headers were moved out of
the alltypes system.
- fast types for 8- and 64-bit are hard-coded (at least for now); only
the 16- and 32-bit ones have reason to vary by arch.
and the following types have been changed for C++ ABI purposes;
- mbstate_t now has a struct tag, __mbstate_t
- FILE's struct tag has been changed to _IO_FILE
- DIR's struct tag has been changed to __dirstream
- locale_t's struct tag has been changed to __locale_struct
- pthread_t is defined as unsigned long in C++ mode only
- fpos_t now has a struct tag, _G_fpos64_t
- fsid_t's struct tag has been changed to __fsid_t
- idtype_t has been made an enum type (also required by POSIX)
- nl_catd has been changed from long to void *
- siginfo_t's struct tag has been removed
- sigset_t's has been given a struct tag, __sigset_t
- stack_t has been given a struct tag, sigaltstack
- suseconds_t has been changed to long on 32-bit archs
- [u]intptr_t have been changed from long to int rank on 32-bit archs
- dev_t has been made unsigned
summary of tests that have been performed against these changes:
- nsz's libc-test (diff -u before and after)
- C++ ABI check symbol dump (diff -u before, after, glibc)
- grepped for __NEED, made sure types needed are still in alltypes
- built gcc 3.4.6
2013-07-22 15:22:36 +00:00
|
|
|
};
|
|
|
|
#define sa_handler __sa_handler.sa_handler
|
|
|
|
#define sa_sigaction __sa_handler.sa_sigaction
|
|
|
|
|
2011-03-29 17:01:25 +00:00
|
|
|
struct sigevent {
|
|
|
|
union sigval sigev_value;
|
|
|
|
int sigev_signo;
|
|
|
|
int sigev_notify;
|
|
|
|
void (*sigev_notify_function)(union sigval);
|
|
|
|
pthread_attr_t *sigev_notify_attributes;
|
2011-06-16 21:11:35 +00:00
|
|
|
char __pad[56-3*sizeof(long)];
|
2011-03-29 17:01:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define SIGEV_SIGNAL 0
|
|
|
|
#define SIGEV_NONE 1
|
|
|
|
#define SIGEV_THREAD 2
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
int __libc_current_sigrtmin(void);
|
|
|
|
int __libc_current_sigrtmax(void);
|
|
|
|
|
|
|
|
#define SIGRTMIN (__libc_current_sigrtmin())
|
|
|
|
#define SIGRTMAX (__libc_current_sigrtmax())
|
|
|
|
|
|
|
|
int kill(pid_t, int);
|
|
|
|
|
|
|
|
int sigemptyset(sigset_t *);
|
|
|
|
int sigfillset(sigset_t *);
|
|
|
|
int sigaddset(sigset_t *, int);
|
|
|
|
int sigdelset(sigset_t *, int);
|
|
|
|
int sigismember(const sigset_t *, int);
|
|
|
|
|
2012-09-07 02:44:55 +00:00
|
|
|
int sigprocmask(int, const sigset_t *__restrict, sigset_t *__restrict);
|
2011-02-12 05:22:29 +00:00
|
|
|
int sigsuspend(const sigset_t *);
|
2012-09-07 02:44:55 +00:00
|
|
|
int sigaction(int, const struct sigaction *__restrict, struct sigaction *__restrict);
|
2011-02-12 05:22:29 +00:00
|
|
|
int sigpending(sigset_t *);
|
2012-09-07 02:44:55 +00:00
|
|
|
int sigwait(const sigset_t *__restrict, int *__restrict);
|
|
|
|
int sigwaitinfo(const sigset_t *__restrict, siginfo_t *__restrict);
|
|
|
|
int sigtimedwait(const sigset_t *__restrict, siginfo_t *__restrict, const struct timespec *__restrict);
|
2018-03-10 23:03:17 +00:00
|
|
|
int sigqueue(pid_t, int, union sigval);
|
2011-02-12 05:22:29 +00:00
|
|
|
|
2012-09-07 02:44:55 +00:00
|
|
|
int pthread_sigmask(int, const sigset_t *__restrict, sigset_t *__restrict);
|
2011-02-15 01:33:54 +00:00
|
|
|
int pthread_kill(pthread_t, int);
|
2011-02-12 05:22:29 +00:00
|
|
|
|
2011-09-02 18:25:43 +00:00
|
|
|
void psiginfo(const siginfo_t *, const char *);
|
|
|
|
void psignal(int, const char *);
|
|
|
|
|
2011-02-15 01:33:54 +00:00
|
|
|
#endif
|
2011-02-12 05:22:29 +00:00
|
|
|
|
2014-09-10 16:27:33 +00:00
|
|
|
#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
|
2011-02-15 01:33:54 +00:00
|
|
|
int killpg(pid_t, int);
|
2012-09-07 02:44:55 +00:00
|
|
|
int sigaltstack(const stack_t *__restrict, stack_t *__restrict);
|
2011-02-12 05:22:29 +00:00
|
|
|
int sighold(int);
|
|
|
|
int sigignore(int);
|
2011-02-15 01:33:54 +00:00
|
|
|
int siginterrupt(int, int);
|
|
|
|
int sigpause(int);
|
|
|
|
int sigrelse(int);
|
2011-02-12 05:22:29 +00:00
|
|
|
void (*sigset(int, void (*)(int)))(int);
|
2011-09-20 00:02:12 +00:00
|
|
|
#define TRAP_BRKPT 1
|
|
|
|
#define TRAP_TRACE 2
|
2017-11-26 23:20:38 +00:00
|
|
|
#define TRAP_BRANCH 3
|
|
|
|
#define TRAP_HWBKPT 4
|
2018-08-22 17:10:55 +00:00
|
|
|
#define TRAP_UNK 5
|
2011-09-20 00:02:12 +00:00
|
|
|
#define POLL_IN 1
|
|
|
|
#define POLL_OUT 2
|
|
|
|
#define POLL_MSG 3
|
|
|
|
#define POLL_ERR 4
|
|
|
|
#define POLL_PRI 5
|
|
|
|
#define POLL_HUP 6
|
|
|
|
#define SS_ONSTACK 1
|
|
|
|
#define SS_DISABLE 2
|
2016-08-20 15:04:44 +00:00
|
|
|
#define SS_AUTODISARM (1U << 31)
|
|
|
|
#define SS_FLAG_BITS SS_AUTODISARM
|
2011-02-15 01:33:54 +00:00
|
|
|
#endif
|
2011-02-12 05:22:29 +00:00
|
|
|
|
2012-12-03 21:57:01 +00:00
|
|
|
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
|
2013-10-21 02:01:51 +00:00
|
|
|
#define NSIG _NSIG
|
2012-05-23 01:52:08 +00:00
|
|
|
typedef void (*sig_t)(int);
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#ifdef _GNU_SOURCE
|
2011-04-13 12:45:28 +00:00
|
|
|
typedef void (*sighandler_t)(int);
|
2012-05-23 01:54:19 +00:00
|
|
|
void (*bsd_signal(int, void (*)(int)))(int);
|
2011-09-12 04:00:30 +00:00
|
|
|
int sigisemptyset(const sigset_t *);
|
2014-01-07 07:50:34 +00:00
|
|
|
int sigorset (sigset_t *, const sigset_t *, const sigset_t *);
|
|
|
|
int sigandset(sigset_t *, const sigset_t *, const sigset_t *);
|
2012-12-06 19:51:32 +00:00
|
|
|
|
2011-05-05 21:44:06 +00:00
|
|
|
#define SA_NOMASK SA_NODEFER
|
2011-09-20 00:02:12 +00:00
|
|
|
#define SA_ONESHOT SA_RESETHAND
|
2011-02-12 05:22:29 +00:00
|
|
|
#endif
|
|
|
|
|
2011-09-22 02:25:31 +00:00
|
|
|
#define SIG_ERR ((void (*)(int))-1)
|
|
|
|
#define SIG_DFL ((void (*)(int)) 0)
|
|
|
|
#define SIG_IGN ((void (*)(int)) 1)
|
|
|
|
|
2011-02-15 01:33:54 +00:00
|
|
|
typedef int sig_atomic_t;
|
|
|
|
|
|
|
|
void (*signal(int, void (*)(int)))(int);
|
|
|
|
int raise(int);
|
|
|
|
|
add time64 symbol name redirects to public headers, under arch control
a _REDIR_TIME64 macro is introduced, which the arch's alltypes.h is
expected to define, to control redirection of symbol names for
interfaces that involve time_t and derived types. this ensures that
object files will only be linked to libc interfaces matching the ABI
whose headers they were compiled against.
along with time32 compat shims, which will be introduced separately,
the redirection also makes it possible for a single libc (static or
shared) to be used with object files produced with either the old
(32-bit time_t) headers or the new ones after 64-bit time_t switchover
takes place. mixing of such object files (or shared libraries) in the
same program will also be possible, but must be done with care; ABI
between libc and a consumer of the libc interfaces is guaranteed to
match by the the symbol name redirection, but pairwise ABI between
consumers of libc that define interfaces between each other in terms
of time_t is not guaranteed to match.
this change adds a dependency on an additional "GNU C" feature to the
public headers for existing 32-bit archs, which is generally
undesirable; however, the feature is one which glibc has depended on
for a long time, and thus which any viable alternative compiler is
going to need to provide. 64-bit archs are not affected, nor will
future 32-bit archs be, regardless of whether they are "new" on the
kernel side (e.g. riscv32) or just newly-added (e.g. a new sparc or
xtensa port). the same applies to newly-added ABIs for existing
machine-level archs.
2019-07-31 19:24:58 +00:00
|
|
|
#if _REDIR_TIME64
|
|
|
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
|
|
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
|
|
|
|| defined(_BSD_SOURCE)
|
|
|
|
__REDIR(sigtimedwait, __sigtimedwait_time64);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2011-02-12 05:22:29 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|