summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/sysdeps')
-rw-r--r--libpthread/nptl/sysdeps/mips/Makefile.arch1
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in68
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in22
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h9
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/raise.c2
9 files changed, 70 insertions, 42 deletions
diff --git a/libpthread/nptl/sysdeps/mips/Makefile.arch b/libpthread/nptl/sysdeps/mips/Makefile.arch
index c12ae370f..2b1238640 100644
--- a/libpthread/nptl/sysdeps/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/mips/Makefile.arch
@@ -16,6 +16,7 @@ ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-mips = $(SSP_ALL_CFLAGS)
+#CFLAGS:=$(CFLAGS:-O1=-O2)
PTHREAD_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/mips
PTHREAD_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/mips
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index ef4e0c72e..3650fb669 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -10,33 +10,63 @@
# pt-longjmp.c in libc and libpthread. For uClibc, they are
# in libc only.
#
-CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c pthread_cond_signal.c \
- pthread_cond_timedwait.c pthread_cond_wait.c \
- pthread_rwlock_rdlock.c pthread_rwlock_timedrdlock.c \
- pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c \
- pthread_rwlock_wrlock.c pthread_sigmask.c pthread_spin_destroy.c \
- pthread_spin_init.c pthread_spin_unlock.c sigaction.c \
- sigfillset.c sigprocmask.c unwind-forcedunwind.c
+libpthread_CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c \
+ pthread_cond_signal.c pthread_cond_timedwait.c \
+ pthread_cond_wait.c pthread_rwlock_rdlock.c \
+ pthread_rwlock_timedrdlock.c \
+ pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c \
+ pthread_rwlock_wrlock.c pthread_sigmask.c \
+ pthread_spin_destroy.c pthread_spin_init.c \
+ pthread_spin_unlock.c sigaction.c sigfillset.c \
+ sigprocmask.c unwind-forcedunwind.c
-CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
-CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE
-CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE
-CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE
-CFLAGS-sigaction.c = -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
+CFLAGS-common = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS)
+
+CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_broadcast.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_signal.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_timedwait.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_wait.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_rdlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_timedrdlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_timedwrlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_unlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_wrlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_sigmask.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-sigaction.c = $(CFLAGS-common) -DIS_IN_libpthread=1 \
+ -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
-I$(top_srcdir)libc/signal
-CFLAGS-sigfillset.c = -I$(top_srcdir)libc/signal
-CFLAGS-sigprocmask.c = -I$(top_srcdir)libc/sysdeps/linux/common
+CFLAGS-sigfillset.c = $(CFLAGS-common) -DIS_IN_libpthread=1 \
+ -I$(top_srcdir)libc/signal
+CFLAGS-sigprocmask.c = $(CFLAGS-common) -DIS_IN_libpthread=1 \
+ -I$(top_srcdir)libc/sysdeps/linux/common
+CFLAGS-unwind-forcedunwind.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-librt-cancellation.c = -DIS_IN_librt=1 $(CFLAGS-common) \
+ -fexceptions -fasynchronous-unwind-tables
+CFLAGS-rt-unwind-resume.c = -DIS_IN_librt=1 $(CFLAGS-common) \
+ -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pthread = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS) -DIS_IN_libpthread=1
+#CFLAGS:=$(CFLAGS:-O1=-O2)
pthread_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/pthread
pthread_OUT := $(top_builddir)/libpthread/nptl/sysdeps/pthread
-PTHREAD_SRC = $(patsubst %.c, $(pthread_DIR)/%.c, $(CSRC))
-PTHREAD_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(CSRC))
+pthread_SRC = $(patsubst %.c, $(pthread_DIR)/%.c, $(libpthread_CSRC))
+pthread_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libpthread_CSRC))
+
+libpthread-a-y += $(pthread_OBJ)
+libpthread-so-y += $(pthread_OBJ:.o=.oS)
-libpthread-a-y += $(PTHREAD_OBJ)
-libpthread-so-y += $(PTHREAD_OBJ:.o=.oS)
+librt-a-y += $(pthread_OUT)/librt-cancellation.o
+librt-so-y += $(pthread_OUT)/librt-cancellation.oS \
+ $(pthread_OUT)/rt-unwind-resume.oS
ifeq ($(UCLIBC_CTOR_DTOR),y)
CFLAGS-pt-initfini.c = -S -g0 -fPIC -fno-inline-functions \
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
index b2f25dc50..66c083f4a 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
@@ -10,10 +10,12 @@ libpthread_CSRC = pt-raise.c pthread_attr_getaffinity.c \
pthread_getcpuclockid.c pthread_kill.c \
pthread_mutex_cond_lock.c pthread_setaffinity.c \
pthread_yield.c sem_post.c sem_timedwait.c \
- sem_trywait.c sem_wait.c pt-fork.c
+ sem_trywait.c sem_wait.c pt-fork.c \
+ sigtimedwait.c sigwaitinfo.c sigwait.c sleep.c
libc_CSRC = libc_pthread_init.c libc_multiple_threads.c \
- register-atfork.c unregister-atfork.c
+ register-atfork.c unregister-atfork.c getpid.c \
+ raise.c sleep.c
ifeq ($(TARGET_ARCH),alpha)
libpthread_CSRC += lowlevellock.c
@@ -39,16 +41,20 @@ CFLAGS-pt-fork.c = -D_GNU_SOURCE
CFLAGS-pthread_getcpuclockid.c = -I$(top_srcdir)/librt
CFLAGS-linux = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 $(SSP_ALL_CFLAGS)
+#CFLAGS:=$(CFLAGS:-O1=-O2)
CFLAGS-OMIT-libc_pthread_init.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-libc_multiple_threads.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-register-atfork.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-unregister-atfork.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+CFLAGS-OMIT-getpid.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+CFLAGS-OMIT-raise.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+CFLAGS-OMIT-sleep.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
-pthread_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/unix/sysv/linux
-pthread_OUT := $(top_builddir)/libpthread/nptl/sysdeps/unix/sysv/linux
+linux_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/unix/sysv/linux
+linux_OUT := $(top_builddir)/libpthread/nptl/sysdeps/unix/sysv/linux
-PTHREAD_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libpthread_CSRC))
+PTHREAD_OBJ = $(patsubst %.c, $(linux_OUT)/%.o, $(libpthread_CSRC))
libpthread-a-y += $(PTHREAD_OBJ)
libpthread-so-y += $(PTHREAD_OBJ:.o=.oS)
@@ -56,13 +62,13 @@ libpthread-so-y += $(PTHREAD_OBJ:.o=.oS)
#
# Special suffix rules.
#
-LIBC_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libc_CSRC))
+LIBC_OBJ = $(patsubst %.c, $(linux_OUT)/%.o, $(libc_CSRC))
libc-a-y += $(LIBC_OBJ)
-libc-so-y += $(LIBC_OBJ:.o=.oS)
+libc-so-y += $(LIBC_OBJ:.o=.os)
objclean-y += pthread_linux_objclean
pthread_linux_objclean:
- $(RM) $(pthread_OUT)/*.{o,os,oS}
+ $(RM) $(linux_OUT)/*.{o,os,oS}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
index 98307ff21..e39f63229 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
@@ -46,7 +46,7 @@ really_getpid (pid_t oldval)
}
#endif
-pid_t
+pid_t attribute_hidden
__getpid (void)
{
#ifdef NOT_IN_libc
@@ -60,6 +60,4 @@ __getpid (void)
return result;
}
-libc_hidden_def (__getpid)
weak_alias (__getpid, getpid)
-libc_hidden_def (getpid)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
index dd2d40a44..3fc7f8e67 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
@@ -25,13 +25,8 @@
# include <sgidefs.h>
#endif
-# include <linux/version.h>
-# define __LINUX_KERNEL_VERSION LINUX_VERSION_CODE
-
-#ifndef __LINUX_KERNEL_VERSION
-/* We assume the worst; all kernels should be supported. */
-# define __LINUX_KERNEL_VERSION 0
-#endif
+#include <linux/version.h>
+#define __LINUX_KERNEL_VERSION LINUX_VERSION_CODE
/* We assume for __LINUX_KERNEL_VERSION the same encoding used in
linux/version.h. I.e., the major, minor, and subminor all get a
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
index b3f48700c..7f431bd1f 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
@@ -18,6 +18,7 @@ CFLAGS-pthread_once.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
ASFLAGS += -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS += $(SSP_ALL_CFLAGS)
+#CFLAGS:=$(CFLAGS:-O1=-O2)
LINUX_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/unix/sysv/linux/mips
LINUX_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/unix/sysv/linux/mips
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
index 02508e215..5fee89235 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
@@ -17,10 +17,9 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <sysdeps/generic/sysdep.h>
#include <tls.h>
#ifndef __ASSEMBLER__
-# include <nptl/pthreadP.h>
+# include <pthreadP.h>
#endif
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
index e9c2b6e79..9d16fee56 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
@@ -282,6 +282,4 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
return retval;
}
-#else
-# include <sysdeps/generic/mq_notify.c>
#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
index 28d03c383..29b1cd6b9 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
@@ -21,7 +21,7 @@
#include <limits.h>
#include <signal.h>
#include <sysdep.h>
-#include <nptl/pthreadP.h>
+#include <pthreadP.h>
#include <kernel-features.h>