summaryrefslogtreecommitdiffstats
path: root/libpthread/linuxthreads
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-06-18 14:36:55 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-06-18 14:36:55 +0000
commit5ffc30ac873a193b37e6f3bfde022b94fc6fab0d (patch)
tree9854f6f9f9705d93a193f4cb2a15c08fe68e4c0f /libpthread/linuxthreads
parentaec95adbb445a6cb45e4609bc35f4fd0b3e67250 (diff)
downloaduClibc-alpine-5ffc30ac873a193b37e6f3bfde022b94fc6fab0d.tar.bz2
uClibc-alpine-5ffc30ac873a193b37e6f3bfde022b94fc6fab0d.tar.xz
Synch linuxthreds with trunk
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r--libpthread/linuxthreads/Makefile.in42
-rw-r--r--libpthread/linuxthreads/libc_pthread_init.c2
-rw-r--r--libpthread/linuxthreads/semaphore.h19
-rw-r--r--libpthread/linuxthreads/sysdeps/sh/pt-machine.h2
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c2
5 files changed, 37 insertions, 30 deletions
diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
index 459be19c5..b7c8914f5 100644
--- a/libpthread/linuxthreads/Makefile.in
+++ b/libpthread/linuxthreads/Makefile.in
@@ -86,52 +86,50 @@ headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers
headers_clean-y += linuxthreads_headers_clean
#ifeq ($(DOMULTI),n)
-$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc) $(top_builddir)lib/libpthread_nonshared.a
+$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc.depend) $(top_builddir)lib/libpthread_nonshared.a
$(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
#else
-#$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread.oS | $(libc) $(top_builddir)lib/libpthread_nonshared.a
+#$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread.oS | $(libc.depend) $(top_builddir)lib/libpthread_nonshared.a
# $(call linkm.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
#endif
$(Q)$(RM) $@
$(Q)cp $(top_srcdir)extra/scripts/format.lds $@
$(Q)echo "GROUP ( $(notdir $@).$(MAJOR_VERSION) libpthread_nonshared.a )" >> $@
-$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
- $(Q)$(RM) $@
ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
- $(do_strip:-x=-X --strip-debug)
-else
- $(do_strip)
+$(libpthread_OUT)/libpthread_so.a: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug)
endif
+$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
+ $(Q)$(RM) $@
$(do_ar)
+ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
+$(libpthread_OUT)/libpthread.oS: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug)
+endif
$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC)
$(Q)$(RM) $@
$(compile-m)
+
ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
- $(do_t_strip:-x=-X --strip-debug)
-else
- $(do_t_strip)
+$(top_builddir)lib/libpthread.a: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug)
endif
-
$(top_builddir)lib/libpthread.a: $(libpthread-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
- $(do_strip:-x=-X --strip-debug)
-else
- $(do_strip)
-endif
$(do_ar)
-linuxthreads_headers:
- $(Q)$(LN) -sf ../$(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/
- $(Q)$(LN) -sf ../$(PTDIR)/semaphore.h $(top_builddir)include/
- $(Q)$(INSTALL) -d $(top_builddir)include/bits
- $(Q)$(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
+include/pthread.h:
+ $(do_ln) ../$(PTDIR)/sysdeps/pthread/$(@F) $(top_builddir)$@
+include/semaphore.h:
+ $(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@
+include/bits/pthreadtypes.h: | include/bits
+ $(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@
+linuxthreads_headers: include/pthread.h include/semaphore.h \
+ include/bits/pthreadtypes.h
linuxthreads_headers_clean:
- $(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \
+ $(RM) $(top_builddir)include/pthread.h \
+ $(top_builddir)include/semaphore.h \
$(top_builddir)include/bits/pthreadtypes.h
libpthread_clean:
diff --git a/libpthread/linuxthreads/libc_pthread_init.c b/libpthread/linuxthreads/libc_pthread_init.c
index e8482c554..f89c2872e 100644
--- a/libpthread/linuxthreads/libc_pthread_init.c
+++ b/libpthread/linuxthreads/libc_pthread_init.c
@@ -26,7 +26,7 @@
#include "internals.h"
#ifdef SHARED
-libc_hidden_proto(memcpy)
+/* Experimentally off - libc_hidden_proto(memcpy) */
#endif
#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
diff --git a/libpthread/linuxthreads/semaphore.h b/libpthread/linuxthreads/semaphore.h
index 8407007d0..3084209f6 100644
--- a/libpthread/linuxthreads/semaphore.h
+++ b/libpthread/linuxthreads/semaphore.h
@@ -13,7 +13,7 @@
/* GNU Library General Public License for more details. */
#ifndef _SEMAPHORE_H
-#define _SEMAPHORE_H 1
+#define _SEMAPHORE_H 1
#include <features.h>
#include <sys/types.h>
@@ -42,7 +42,7 @@ typedef struct
#define SEM_FAILED ((sem_t *) 0)
/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
+#define SEM_VALUE_MAX (2147483647)
__BEGIN_DECLS
@@ -54,7 +54,7 @@ extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW;
/* Free resources associated with semaphore object SEM. */
extern int sem_destroy (sem_t *__sem) __THROW;
-/* Open a named semaphore NAME with open flaot OFLAG. */
+/* Open a named semaphore NAME with open flags OFLAG. */
extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
/* Close descriptor for named semaphore SEM. */
@@ -63,11 +63,17 @@ extern int sem_close (sem_t *__sem) __THROW;
/* Remove named semaphore NAME. */
extern int sem_unlink (__const char *__name) __THROW;
-/* Wait for SEM being posted. */
+/* Wait for SEM being posted.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int sem_wait (sem_t *__sem);
#ifdef __USE_XOPEN2K
-/* Similar to `sem_wait' but wait only until ABSTIME. */
+/* Similar to `sem_wait' but wait only until ABSTIME.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
extern int sem_timedwait (sem_t *__restrict __sem,
__const struct timespec *__restrict __abstime);
#endif
@@ -82,6 +88,7 @@ extern int sem_post (sem_t *__sem) __THROW;
extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
__THROW;
+
__END_DECLS
-#endif /* semaphore.h */
+#endif /* semaphore.h */
diff --git a/libpthread/linuxthreads/sysdeps/sh/pt-machine.h b/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
index 4ec87ad89..793f80b2d 100644
--- a/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
+++ b/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
@@ -29,6 +29,8 @@
# define PT_EI __extern_always_inline
#endif
+extern long int testandset (int *spinlock);
+
/* Spinlock implementation; required. */
PT_EI long int
testandset (int *spinlock)
diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c
index eace94c86..6cd0f09c1 100644
--- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c
@@ -196,7 +196,7 @@ init_mq_netlink (void)
if (err == 0)
{
- static int added_atfork;
+ static smallint added_atfork;
if (added_atfork == 0
&& pthread_atfork (NULL, NULL, reset_once) != 0)