svn commit: branches/uClibc-nptl: libc/signal libc/sysdeps/linux/common li etc...

sjhill at uclibc.org sjhill at uclibc.org
Thu Dec 8 05:02:11 UTC 2005


Author: sjhill
Date: 2005-12-07 21:02:08 -0800 (Wed, 07 Dec 2005)
New Revision: 12721

Log:
NPTL changes for signal handling, getpid, sleep, raise and a few things
for new librt code. Also cleaned up the makefiles.


Modified:
   branches/uClibc-nptl/libc/signal/allocrtsig.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/Makefile.in
   branches/uClibc-nptl/libc/sysdeps/linux/common/sigprocmask.c
   branches/uClibc-nptl/libc/unistd/Makefile.in
   branches/uClibc-nptl/libpthread/nptl/Banner
   branches/uClibc-nptl/libpthread/nptl/Makefile.in
   branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h
   branches/uClibc-nptl/libpthread/nptl/pthread_getattr_np.c
   branches/uClibc-nptl/libpthread/nptl/sysdeps/mips/Makefile.arch
   branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile.in
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c


Changeset:
Modified: branches/uClibc-nptl/libc/signal/allocrtsig.c
===================================================================
--- branches/uClibc-nptl/libc/signal/allocrtsig.c	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libc/signal/allocrtsig.c	2005-12-08 05:02:08 UTC (rev 12721)
@@ -32,7 +32,11 @@
 static int current_rtmin = -1;
 static int current_rtmax = -1;
 #else
+# ifdef __UCLIBC_HAS_THREADS_NATIVE__
 static int current_rtmin = __SIGRTMIN + 2;
+# else
+static int current_rtmin = __SIGRTMIN;
+# endif
 static int current_rtmax = __SIGRTMAX;
 #endif
 

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/Makefile.in
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/Makefile.in	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/Makefile.in	2005-12-08 05:02:08 UTC (rev 12721)
@@ -29,6 +29,10 @@
 CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
 endif
 
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+CSRC:=$(filter-out getpid.c raise.c,$(CSRC))
+endif
+
 # fails for some reason
 ifneq ($(strip $(ARCH_OBJS)),)
 CSRC:=$(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/sigprocmask.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/sigprocmask.c	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/sigprocmask.c	2005-12-08 05:02:08 UTC (rev 12721)
@@ -15,6 +15,7 @@
 #ifdef __NR_rt_sigprocmask
 
 #define __NR___rt_sigprocmask __NR_rt_sigprocmask
+static inline
 _syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set,
 		  sigset_t *, oldset, size_t, size);
 
@@ -42,18 +43,6 @@
 	}
 #endif
 
-	if (set &&
-#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
-		(((unsigned int) how) > 2)
-#else
-#warning "compile time assumption violated.. slow path..."
-		((how != SIG_BLOCK) && (how != SIG_UNBLOCK)
-		 && (how != SIG_SETMASK))
-#endif
-		) {
-		__set_errno(EINVAL);
-		return -1;
-	}
 	return __rt_sigprocmask(how, set, oldset, _NSIG / 8);
 }
 
@@ -89,18 +78,6 @@
 	}
 #endif
 
-	if (set &&
-#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
-		(((unsigned int) how) > 2)
-#else
-#warning "compile time assumption violated.. slow path..."
-		((how != SIG_BLOCK) && (how != SIG_UNBLOCK)
-		 && (how != SIG_SETMASK))
-#endif
-		) {
-		__set_errno(EINVAL);
-		return -1;
-	}
 	return (__syscall_sigprocmask(how, set, oldset));
 }
 #endif

Modified: branches/uClibc-nptl/libc/unistd/Makefile.in
===================================================================
--- branches/uClibc-nptl/libc/unistd/Makefile.in	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libc/unistd/Makefile.in	2005-12-08 05:02:08 UTC (rev 12721)
@@ -22,6 +22,10 @@
 CSRC+=getopt-susv3.c
 endif
 
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+CSRC:=$(filter-out sleep.c,$(CSRC))
+endif
+
 UNISTD_DIR:=$(top_srcdir)libc/unistd
 UNISTD_OUT:=$(top_builddir)libc/unistd
 

Modified: branches/uClibc-nptl/libpthread/nptl/Banner
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/Banner	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/Banner	2005-12-08 05:02:08 UTC (rev 12721)
@@ -1 +1 @@
-Native POSIX Threads Library by Ulrich Drepper et al
+Native POSIX Threads Library by Ulrich Drepper et al, uClibc port by Steven Hill

Modified: branches/uClibc-nptl/libpthread/nptl/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/Makefile.in	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/Makefile.in	2005-12-08 05:02:08 UTC (rev 12721)
@@ -87,7 +87,7 @@
 		      pt-raise pt-system \
 		      flockfile ftrylockfile funlockfile \
 		      sigaction \
-		      herrno res pt-allocrtsig \
+		      herrno res \
 		      pthread_kill_other_threads \
 		      pthread_getaffinity pthread_setaffinity \
 		      pthread_attr_getaffinity pthread_attr_setaffinity \
@@ -168,6 +168,7 @@
 CFLAGS-sem_open.c = -D_GNU_SOURCE
 
 CFLAGS-nptl = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS) -DIS_IN_libpthread=1
+#CFLAGS:=$(CFLAGS:-O1=-O2)
 
 CFLAGS-OMIT-alloca_cutoff.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
 CFLAGS-OMIT-forward.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
@@ -238,7 +239,8 @@
 
 libc-a-y += $(patsubst %.c, $(libpthread_OUT)/%.o, alloca_cutoff.c	\
 	    forward.c libc-cancellation.c)
-libc-so-y += $(patsubst %.c, $(libpthread_OUT)/%.oS, forward.c)
+libc-so-y += $(patsubst %.c, $(libpthread_OUT)/%.oS, forward.c		\
+	    libc-cancellation.c)
 
 libpthread-a-y := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_a_SRC))
 libpthread-so-y := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.oS,$(libpthread_so_SRC))
@@ -252,7 +254,6 @@
 lib-so-y += $(top_builddir)lib/libpthread.so
 
 objclean-y += libpthread_clean
-
 headers-y += nptl_headers
 headers_clean-y += nptl_headers_clean
 
@@ -290,8 +291,8 @@
 	$(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(top_builddir)include/bits/
 
 nptl_headers_clean:
-	$(RM) ../$(PTDIR)/banner.h $(top_builddir)include/pthread.h	\
-	      ../$(PTDIR)/version.h $(top_builddir)include/semaphore.h
+	$(RM) $(PTDIR)/banner.h $(top_builddir)include/pthread.h	\
+	      $(PTDIR)/version.h $(top_builddir)include/semaphore.h
 
 libpthread_clean:
 	$(RM) $(libpthread_OUT)/*.{o,os,oS}

Modified: branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/compat/libc-symbols.h	2005-12-08 05:02:08 UTC (rev 12721)
@@ -51,74 +51,20 @@
 #define text_set_element(set, symbol) _elf_set_element(set, symbol)
 #define __sec_comment "\n\t#"
 
-#if 0
 # ifndef __ASSEMBLER__
-#  if !defined HAVE_VISIBILITY_ATTRIBUTE \
-      || defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE
-#   define __hidden_proto_hiddenattr(attrs...)
-#  else
-#   define __hidden_proto_hiddenattr(attrs...) \
-  __attribute__ ((visibility ("hidden"), ##attrs))
-#  endif
-#  define hidden_proto(name, attrs...) \
-  __hidden_proto (name, __GI_##name, ##attrs)
-#  define __hidden_proto(name, internal, attrs...) \
-  extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
-  __hidden_proto_hiddenattr (attrs);
-#  define __hidden_asmname(name) \
-  __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
-#  define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
-#  define __hidden_asmname2(prefix, name) #prefix name
-#  define __hidden_ver1(local, internal, name) \
-  extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
-  extern __typeof (name) __EI_##name \
-	__attribute__((alias (__hidden_asmname (#local))))
-#  define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name);
-#  define hidden_data_ver(local, name)	hidden_ver(local, name)
-#  define hidden_def(name)		__hidden_ver1(__GI_##name, name, name);
-#  define hidden_data_def(name)		hidden_def(name)
-#  define hidden_weak(name) \
-	__hidden_ver1(__GI_##name, name, name) __attribute__((weak));
-#  define hidden_data_weak(name)	hidden_weak(name)
-# else
-/* For assembly, we need to do the opposite of what we do in C:
-   in assembly gcc __REDIRECT stuff is not in place, so functions
-   are defined by its normal name and we need to create the
-   __GI_* alias to it, in C __REDIRECT causes the function definition
-   to use __GI_* name and we need to add alias to the real name.
-   There is no reason to use hidden_weak over hidden_def in assembly,
-   but we provide it for consistency with the C usage.
-   hidden_proto doesn't make sense for assembly but the equivalent
-   is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET.  */
-#  define hidden_def(name)	strong_alias (name, __GI_##name)
-#  define hidden_weak(name)	hidden_def (name)
-#  define hidden_ver(local, name) strong_alias (local, __GI_##name)
-#  define hidden_data_def(name)	strong_data_alias (name, __GI_##name)
-#  define hidden_data_weak(name)	hidden_data_def (name)
-#  define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name)
-#  ifdef HAVE_ASM_GLOBAL_DOT_NAME
-#   define HIDDEN_JUMPTARGET(name) .__GI_##name
-#  else
-#   define HIDDEN_JUMPTARGET(name) __GI_##name
-#  endif
-# endif
-#else
-# ifndef __ASSEMBLER__
 #  define hidden_proto(name, attrs...)
 # else
 #  define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
 # endif /* Not  __ASSEMBLER__ */
 # define hidden_weak(name)
-# define hidden_def(name)
 # define hidden_ver(local, name)
 # define hidden_data_weak(name)
 # define hidden_data_def(name)
 # define hidden_data_ver(local, name)
-#endif
 
 #if defined NOT_IN_libc && defined IS_IN_rtld
 # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
-# define rtld_hidden_def(name) hidden_def (name)
+# define rtld_hidden_def(name)
 # define rtld_hidden_weak(name) hidden_weak (name)
 # define rtld_hidden_ver(local, name) hidden_ver (local, name)
 # define rtld_hidden_data_def(name) hidden_data_def (name)
@@ -136,7 +82,7 @@
 
 #if !defined NOT_IN_libc
 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
-# define libc_hidden_def(name) hidden_def (name)
+# define libc_hidden_def(name)
 # define libc_hidden_weak(name) hidden_weak (name)
 # define libc_hidden_ver(local, name) hidden_ver (local, name)
 # define libc_hidden_data_def(name) hidden_data_def (name)

Modified: branches/uClibc-nptl/libpthread/nptl/pthread_getattr_np.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/pthread_getattr_np.c	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/pthread_getattr_np.c	2005-12-08 05:02:08 UTC (rev 12721)
@@ -100,7 +100,7 @@
 
 	  while (! feof_unlocked (fp))
 	    {
-	      if (__getdelim (&line, &linelen, '\n', fp) <= 0)
+	      if (getdelim (&line, &linelen, '\n', fp) <= 0)
 		break;
 
 	      uintptr_t from;

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/mips/Makefile.arch
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/mips/Makefile.arch	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/mips/Makefile.arch	2005-12-08 05:02:08 UTC (rev 12721)
@@ -16,6 +16,7 @@
 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

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile.in	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/Makefile.in	2005-12-08 05:02:08 UTC (rev 12721)
@@ -10,34 +10,64 @@
 #       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	\
 		       $(call check_gcc,-fno-unit-at-a-time,)	\

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in	2005-12-08 05:02:08 UTC (rev 12721)
@@ -10,10 +10,12 @@
 		  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-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 @@
 #
 # 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}

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c	2005-12-08 05:02:08 UTC (rev 12721)
@@ -46,7 +46,7 @@
 }
 #endif
 
-pid_t
+pid_t attribute_hidden
 __getpid (void)
 {
 #ifdef NOT_IN_libc
@@ -60,6 +60,4 @@
   return result;
 }
 
-libc_hidden_def (__getpid)
 weak_alias (__getpid, getpid)
-libc_hidden_def (getpid)

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h	2005-12-08 05:02:08 UTC (rev 12721)
@@ -25,14 +25,9 @@
 # include <sgidefs.h>
 #endif
 
-# include <linux/version.h>
-# define __LINUX_KERNEL_VERSION		LINUX_VERSION_CODE
+#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
-
 /* We assume for __LINUX_KERNEL_VERSION the same encoding used in
    linux/version.h.  I.e., the major, minor, and subminor all get a
    byte with the major number being in the highest byte.  This means

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch	2005-12-08 05:02:08 UTC (rev 12721)
@@ -18,6 +18,7 @@
 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

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h	2005-12-08 05:02:08 UTC (rev 12721)
@@ -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

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c	2005-12-08 05:02:08 UTC (rev 12721)
@@ -282,6 +282,4 @@
   return retval;
 }
 
-#else
-# include <sysdeps/generic/mq_notify.c>
 #endif

Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c	2005-12-08 04:57:34 UTC (rev 12720)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c	2005-12-08 05:02:08 UTC (rev 12721)
@@ -21,7 +21,7 @@
 #include <limits.h>
 #include <signal.h>
 #include <sysdep.h>
-#include <nptl/pthreadP.h>
+#include <pthreadP.h>
 #include <kernel-features.h>
 
 




More information about the uClibc-cvs mailing list