|
@@ -1,6 +1,4 @@
|
|
-/* Special use of signals in NPTL internals. Linux version.
|
|
+/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
|
|
- Copyright (C) 2014-2017 Free Software Foundation, Inc.
|
|
|
|
- This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
modify it under the terms of the GNU Lesser General Public
|
|
@@ -21,27 +19,24 @@
|
|
/* The signal used for asynchronous cancelation. */
|
|
/* The signal used for asynchronous cancelation. */
|
|
#define SIGCANCEL __SIGRTMIN
|
|
#define SIGCANCEL __SIGRTMIN
|
|
|
|
|
|
-
|
|
|
|
/* Signal needed for the kernel-supported POSIX timer implementation.
|
|
/* Signal needed for the kernel-supported POSIX timer implementation.
|
|
We can reuse the cancellation signal since we can distinguish
|
|
We can reuse the cancellation signal since we can distinguish
|
|
cancellation from timer expirations. */
|
|
cancellation from timer expirations. */
|
|
#define SIGTIMER SIGCANCEL
|
|
#define SIGTIMER SIGCANCEL
|
|
|
|
|
|
-
|
|
|
|
/* Signal used to implement the setuid et.al. functions. */
|
|
/* Signal used to implement the setuid et.al. functions. */
|
|
#define SIGSETXID (__SIGRTMIN + 1)
|
|
#define SIGSETXID (__SIGRTMIN + 1)
|
|
|
|
|
|
-
|
|
+/* Return if sig is used internally. */
|
|
-/* Return is sig is used internally. */
|
|
|
|
static inline int
|
|
static inline int
|
|
-__nptl_is_internal_signal (int sig)
|
|
+__is_internal_signal (int sig)
|
|
{
|
|
{
|
|
return (sig == SIGCANCEL) || (sig == SIGTIMER) || (sig == SIGSETXID);
|
|
return (sig == SIGCANCEL) || (sig == SIGTIMER) || (sig == SIGSETXID);
|
|
}
|
|
}
|
|
|
|
|
|
-/* Remove internal glibc signal from the mask. */
|
|
+/* Remove internal signal from the mask. */
|
|
static inline void
|
|
static inline void
|
|
-__nptl_clear_internal_signals (sigset_t *set)
|
|
+__clear_internal_signals (sigset_t *set)
|
|
{
|
|
{
|
|
__sigdelset (set, SIGCANCEL);
|
|
__sigdelset (set, SIGCANCEL);
|
|
__sigdelset (set, SIGTIMER);
|
|
__sigdelset (set, SIGTIMER);
|
|
@@ -51,7 +46,7 @@ __nptl_clear_internal_signals (sigset_t *set)
|
|
#define SIGALL_SET \
|
|
#define SIGALL_SET \
|
|
((__sigset_t) { .__val = {[0 ... _SIGSET_NWORDS-1 ] = -1 } })
|
|
((__sigset_t) { .__val = {[0 ... _SIGSET_NWORDS-1 ] = -1 } })
|
|
|
|
|
|
-/* Block all signals, including internal glibc ones. */
|
|
+/* Block all signals, including internal ones. */
|
|
static inline int
|
|
static inline int
|
|
__libc_signal_block_all (sigset_t *set)
|
|
__libc_signal_block_all (sigset_t *set)
|
|
{
|
|
{
|
|
@@ -60,12 +55,12 @@ __libc_signal_block_all (sigset_t *set)
|
|
set, _NSIG / 8);
|
|
set, _NSIG / 8);
|
|
}
|
|
}
|
|
|
|
|
|
-/* Block all application signals (excluding internal glibc ones). */
|
|
+/* Block all application signals (excluding internal ones). */
|
|
static inline int
|
|
static inline int
|
|
__libc_signal_block_app (sigset_t *set)
|
|
__libc_signal_block_app (sigset_t *set)
|
|
{
|
|
{
|
|
sigset_t allset = SIGALL_SET;
|
|
sigset_t allset = SIGALL_SET;
|
|
- __nptl_clear_internal_signals (&allset);
|
|
+ __clear_internal_signals (&allset);
|
|
INTERNAL_SYSCALL_DECL (err);
|
|
INTERNAL_SYSCALL_DECL (err);
|
|
return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &allset, set,
|
|
return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &allset, set,
|
|
_NSIG / 8);
|
|
_NSIG / 8);
|