summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-15 17:49:47 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:37 +0200
commit95a2ed35514f8e5cc1d1de423a589dedc54df092 (patch)
treed52e4feabc27514e136d64c9e996fa07f0873473
parentd9f20698ed8726d416a87b9d92c15c4f1781042d (diff)
add simplified __sigemptyset for internal use
Use __sigemptyset instead of sigemptyset. Remove hidden sigemptyset. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r--include/signal.h7
-rw-r--r--libc/signal/sigempty.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/include/signal.h b/include/signal.h
index c137c3bdb..d8bb5d277 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -256,7 +256,6 @@ typedef __sighandler_t sig_t;
/* Clear all signals from SET. */
extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
-libc_hidden_proto(sigemptyset)
/* Set all signals in SET. */
extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
@@ -484,6 +483,12 @@ extern int __libc_current_sigrtmin (void) __THROW;
/* Return number of available real-time signal with lowest priority. */
extern int __libc_current_sigrtmax (void) __THROW;
+#ifdef _LIBC
+/* simplified version without parameter checking */
+# include <string.h>
+# undef __sigemptyset
+# define __sigemptyset(ss) (memset(ss, '\0', sizeof(sigset_t)), 0)
+#endif
#endif /* signal.h */
__END_DECLS
diff --git a/libc/signal/sigempty.c b/libc/signal/sigempty.c
index b4f180bbc..2622c0872 100644
--- a/libc/signal/sigempty.c
+++ b/libc/signal/sigempty.c
@@ -20,7 +20,6 @@
#include <signal.h>
#include <string.h>
-
/* Clear all signals from SET. */
int sigemptyset (sigset_t *set)
{
@@ -36,4 +35,3 @@ int sigemptyset (sigset_t *set)
return 0;
}
-libc_hidden_def(sigemptyset)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
index 1664af5cf..2f33e9981 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
@@ -49,7 +49,7 @@ timer_sigev_thread (void *arg)
surprising for user code, although valid. We unblock all
signals. */
sigset_t ss;
- sigemptyset (&ss);
+ __sigemptyset (&ss);
INTERNAL_SYSCALL_DECL (err);
INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
@@ -75,7 +75,7 @@ timer_helper_thread (void *arg)
/* Wait for the SIGTIMER signal, allowing the setXid signal, and
none else. */
sigset_t ss;
- sigemptyset (&ss);
+ __sigemptyset (&ss);
__sigaddset (&ss, SIGTIMER);
/* Endless loop of waiting for signals. The loop is only ended when