diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | nptl/ChangeLog | 12 | ||||
-rw-r--r-- | nptl/allocatestack.c | 5 | ||||
-rw-r--r-- | nptl/descr.h | 4 | ||||
-rw-r--r-- | nptl/init.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/i386/tls.h | 10 | ||||
-rw-r--r-- | nptl/sysdeps/powerpc/tcb-offsets.sym | 1 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sem_timedwait.c | 10 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sem_wait.c | 1 | ||||
-rw-r--r-- | nptl/sysdeps/x86_64/tls.h | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/libc-start.c | 1 |
11 files changed, 27 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog index 58622d2f0a..b7586ef06f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-05-26 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/powerpc/libc-start.c: Include <sysdep.h>. + 2007-05-25 Jakub Jelinek <jakub@redhat.com> * io/bits/fcntl2.h (__open_2): Add nonnull attribute. diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 02a83c81bb..0cd8193452 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,17 @@ 2007-05-26 Ulrich Drepper <drepper@redhat.com> + * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break. + * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over + duplication of __sem_wait_cleanup. + + * allocatestack.c: Revert last change. + * init.c: Likewise. + * sysdeps/i386/tls.h: Likewise. + * sysdeps/x86_64/tls.h: Likewise. + * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to + header structure. + * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET. + * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier): Add private field. * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition. diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 4ac04dbfa1..aad157a9f9 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -376,9 +376,10 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp, __pthread_multiple_threads = *__libc_multiple_threads_ptr = 1; #endif -#ifdef THREAD_COPY_PRIVATE_FUTEX +#ifndef __ASSUME_PRIVATE_FUTEX /* The thread must know when private futexes are supported. */ - THREAD_COPY_PRIVATE_FUTEX (pd); + pd->header.private_futex = THREAD_GETMEM (THREAD_SELF, + header.private_futex); #endif #ifdef NEED_DL_SYSINFO diff --git a/nptl/descr.h b/nptl/descr.h index 00cad1aa83..203b62a2bf 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -37,6 +37,7 @@ #endif #define __need_res_state #include <resolv.h> +#include <kernel-features.h> #ifndef TCB_ALIGNMENT # define TCB_ALIGNMENT sizeof (double) @@ -131,6 +132,9 @@ struct pthread struct { int multiple_threads; +# ifndef __ASSUME_PRIVATE_FUTEX + int private_futex; +# endif } header; #endif diff --git a/nptl/init.c b/nptl/init.c index d7c74d4e1c..212b835a0d 100644 --- a/nptl/init.c +++ b/nptl/init.c @@ -284,7 +284,7 @@ __pthread_initialize_minimal_internal (void) res = INTERNAL_SYSCALL (futex, err, 3, &word, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1); if (!INTERNAL_SYSCALL_ERROR_P (res, err)) - THREAD_SET_PRIVATE_FUTEX (FUTEX_PRIVATE_FLAG); + pd->header.private_futex = FUTEX_PRIVATE_FLAG; } #endif diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index 90a8b50dad..64eab45c01 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -458,16 +458,6 @@ union user_desc_init #define THREAD_GSCOPE_WAIT() \ GL(dl_wait_lookup_done) () - -#ifndef __ASSUME_PRIVATE_FUTEX -# define THREAD_SET_PRIVATE_FUTEX(value) \ - THREAD_SETMEM (THREAD_SELF, header.private_futex, value) -# define THREAD_COPY_PRIVATE_FUTEX(descr) \ - ((descr)->header.private_futex \ - = THREAD_GETMEM (THREAD_SELF, header.private_futex)) -#endif - - #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/nptl/sysdeps/powerpc/tcb-offsets.sym b/nptl/sysdeps/powerpc/tcb-offsets.sym index 4a8671e802..eda43dce8e 100644 --- a/nptl/sysdeps/powerpc/tcb-offsets.sym +++ b/nptl/sysdeps/powerpc/tcb-offsets.sym @@ -15,3 +15,4 @@ MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) PID thread_offsetof (pid) TID thread_offsetof (tid) POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) +PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex) diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c index 30f6a87df4..4c8acd0938 100644 --- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c +++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c @@ -31,16 +31,6 @@ extern void __sem_wait_cleanup (void *arg) attribute_hidden; -void -attribute_hidden -__sem_wait_cleanup (void *arg) -{ - struct new_sem *isem = (struct new_sem *) arg; - - atomic_decrement (&isem->nwaiters); -} - - int sem_timedwait (sem_t *sem, const struct timespec *abstime) { diff --git a/nptl/sysdeps/unix/sysv/linux/sem_wait.c b/nptl/sysdeps/unix/sysv/linux/sem_wait.c index e35b6480f2..05114c9704 100644 --- a/nptl/sysdeps/unix/sysv/linux/sem_wait.c +++ b/nptl/sysdeps/unix/sysv/linux/sem_wait.c @@ -65,6 +65,7 @@ __new_sem_wait (sem_t *sem) { __set_errno (-err); err = -1; + break; } if (atomic_decrement_if_positive (&isem->value) > 0) diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index cb3b474f97..c3afb3f03c 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -364,14 +364,6 @@ typedef struct #define THREAD_GSCOPE_WAIT() \ GL(dl_wait_lookup_done) () -#ifndef __ASSUME_PRIVATE_FUTEX -# define THREAD_SET_PRIVATE_FUTEX(value) \ - THREAD_SETMEM (THREAD_SELF, header.private_futex, value) -# define THREAD_COPY_PRIVATE_FUTEX(descr) \ - ((descr)->header.private_futex \ - = THREAD_GETMEM (THREAD_SELF, header.private_futex)) -#endif - #endif /* __ASSEMBLER__ */ #endif /* tls.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c index 923eab99ef..a71cfa5b06 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c @@ -20,6 +20,7 @@ #include <stdlib.h> #include <unistd.h> #include <ldsodefs.h> +#include <sysdep.h> #include <bp-start.h> #include <bp-sym.h> |