summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-12-08 05:02:08 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-12-08 05:02:08 +0000
commit99aa495ff35864383680f9773b3cb44040acca08 (patch)
treeb56aebc8e61c8323f75a205df7c902374597132a /libpthread/nptl/sysdeps/unix/sysv/linux
parenta25d5bd4971bb460bd87c684d066fd58359faf32 (diff)
downloaduClibc-alpine-99aa495ff35864383680f9773b3cb44040acca08.tar.bz2
uClibc-alpine-99aa495ff35864383680f9773b3cb44040acca08.tar.xz
NPTL changes for signal handling, getpid, sleep, raise and a few things
for new librt code. Also cleaned up the makefiles.
Diffstat (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux')
-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
7 files changed, 20 insertions, 23 deletions
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>