summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps')
-rw-r--r--libpthread/nptl/sysdeps/generic/sysdep.h2
-rw-r--r--libpthread/nptl/sysdeps/pthread/sigaction.c24
-rw-r--r--libpthread/nptl/sysdeps/sh/sysdep.h2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/fork.c21
4 files changed, 21 insertions, 28 deletions
diff --git a/libpthread/nptl/sysdeps/generic/sysdep.h b/libpthread/nptl/sysdeps/generic/sysdep.h
index 0bbcf9a69..9627b3e79 100644
--- a/libpthread/nptl/sysdeps/generic/sysdep.h
+++ b/libpthread/nptl/sysdeps/generic/sysdep.h
@@ -20,7 +20,7 @@
#ifndef C_LABEL
/* Define a macro we can use to construct the asm name for a C symbol. */
-#ifdef NO_UNDERSCORES
+#ifndef __UCLIBC_UNDERSCORES__
#ifdef __STDC__
#define C_LABEL(name) name##:
#else
diff --git a/libpthread/nptl/sysdeps/pthread/sigaction.c b/libpthread/nptl/sysdeps/pthread/sigaction.c
index 0877e534f..54b5d2de4 100644
--- a/libpthread/nptl/sysdeps/pthread/sigaction.c
+++ b/libpthread/nptl/sysdeps/pthread/sigaction.c
@@ -20,20 +20,21 @@
/* This is tricky. GCC doesn't like #include_next in the primary
source file and even if it did, the first #include_next is this
exact file anyway. */
+#ifndef LIBC_SIGACTION
+
#include <pthreadP.h>
-#include <features.h>
-#include <errno.h>
-#include <signal.h>
-extern __typeof(sigaction) __libc_sigaction;
-extern __typeof(sigaction) __sigaction;
/* We use the libc implementation but we tell it to not allow
SIGCANCEL or SIGTIMER to be handled. */
+# define LIBC_SIGACTION 1
+
+# include <sigaction.c>
+
int
-__sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
+sigaction (int sig, const struct sigaction *act, struct sigaction *oact);
+
+int
+__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
if (__builtin_expect (sig == SIGCANCEL || sig == SIGSETXID, 0))
{
@@ -46,3 +47,8 @@ __sigaction (sig, act, oact)
libc_hidden_proto(sigaction)
weak_alias (__sigaction, sigaction)
libc_hidden_weak(sigaction)
+#else
+
+# include_next <sigaction.c>
+
+#endif /* LIBC_SIGACTION */
diff --git a/libpthread/nptl/sysdeps/sh/sysdep.h b/libpthread/nptl/sysdeps/sh/sysdep.h
index 4dd6af47b..5b75198f9 100644
--- a/libpthread/nptl/sysdeps/sh/sysdep.h
+++ b/libpthread/nptl/sysdeps/sh/sysdep.h
@@ -71,7 +71,7 @@
#define CALL_MCOUNT /* Do nothing. */
#endif
-#ifdef NO_UNDERSCORES
+#ifdef __UCLIBC_UNDERSCORES__
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
index f8a64c0cb..d8219c2ee 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -30,7 +30,6 @@
#include <atomic.h>
#include <errno.h>
-
unsigned long int *__fork_generation_pointer;
@@ -45,7 +44,7 @@ fresetlockfiles (void)
FILE *fp;
#ifdef __USE_STDIO_FUTEXES__
for (fp = _stdio_openlist; fp != NULL; fp = fp->__nextopen)
- _IO_lock_init(fp->_lock);
+ STDIO_INIT_MUTEX(fp->__lock);
#else
pthread_mutexattr_t attr;
@@ -121,11 +120,7 @@ pid_t __libc_fork (void)
break;
}
-#ifdef __USE_STDIO_FUTEXES__
- _IO_lock_lock (_stdio_openlist_lock);
-#else
- __pthread_mutex_lock(&_stdio_openlist_lock);
-#endif
+ __UCLIBC_IO_MUTEX_LOCK(_stdio_openlist_add_lock);
#ifndef NDEBUG
pid_t ppid = THREAD_GETMEM (THREAD_SELF, tid);
@@ -169,11 +164,7 @@ pid_t __libc_fork (void)
fresetlockfiles ();
/* Reset locks in the I/O code. */
-#ifdef __USE_STDIO_FUTEXES__
- _IO_lock_init (_stdio_openlist_lock);
-#else
- __stdio_init_mutex(&_stdio_openlist_lock);
-#endif
+ STDIO_INIT_MUTEX(_stdio_openlist_add_lock);
/* Run the handlers registered for the child. */
while (allp != NULL)
@@ -205,11 +196,7 @@ pid_t __libc_fork (void)
THREAD_SETMEM (THREAD_SELF, pid, parentpid);
/* We execute this even if the 'fork' call failed. */
-#ifdef __USE_STDIO_FUTEXES__
- _IO_lock_unlock(_stdio_openlist_lock);
-#else
- __pthread_mutex_unlock(&_stdio_openlist_lock);
-#endif
+ __UCLIBC_IO_MUTEX_UNLOCK(_stdio_openlist_add_lock);
/* Run the handlers registered for the parent. */
while (allp != NULL)