diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-03-11 22:02:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-03-11 22:02:29 +0000 |
commit | 3e976b962a84255b70bcf6d9751a9a35d3e987ab (patch) | |
tree | fb907a8a5795c4a098f4a6798bacece4822f615e /nptl/sysdeps/unix/sysv/linux/x86_64 | |
parent | 6c477888caa491a3a296f5a8ef594cc4aa37b555 (diff) | |
download | glibc-3e976b962a84255b70bcf6d9751a9a35d3e987ab.tar.gz glibc-3e976b962a84255b70bcf6d9751a9a35d3e987ab.tar.xz glibc-3e976b962a84255b70bcf6d9751a9a35d3e987ab.zip |
Update.
2003-03-11 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (__condvar_cleanup): Wake up all waiters in case we got signaled after being woken up but before disabling asynchronous cancellation. * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (__condvar_cleanup): Likewise. * init.c (__NR_set_tid_address): If already defined, don't redefine. Make it an error if architecture has no #if case. Add x86-64. * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for pt-initfini.s generation. * sysdeps/x86_64/tls.h: Include <asm/prctl.h>. (TLS_INIT_TP): Fix typo.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64')
4 files changed, 12 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile b/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile index c73c2b6c26..9ecb7b092a 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile @@ -1,4 +1,6 @@ ifeq ($(subdir),nptl) +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions -fno-asynchronous-unwind-tables + # We need to make sure that stack memory is allocated in the low 4GB. CFLAGS-pthread_create.c += -DARCH_MAP_FLAGS=MAP_32BIT endif diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S index 2128f1b22e..3621efa4fc 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S @@ -21,7 +21,7 @@ the application is using threads. */ #ifndef UP # define LOCK \ - cmpl $0, __libc_multiple_threads_ptr(%rip); \ + cmpl $0, __libc_multiple_threads(%rip); \ je 0f; \ lock; \ 0: diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S b/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S index a4ce9c2fee..e6dc8677a4 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S @@ -21,7 +21,7 @@ the application is using threads. */ #ifndef UP # define LOCK \ - cmpl $0, __libc_multiple_threads_ptr(%rip); \ + cmpl $0, __libc_multiple_threads(%rip); \ je 0f; \ lock; \ 0: diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S index 060f35e8a9..c15566fdf0 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S @@ -65,6 +65,14 @@ __condvar_cleanup: addq $1, woken_seq(%rdi) + /* Wake up all waiters to make sure no signal gets lost. */ + addq $wakeup_seq, %rdi + movq $FUTEX_WAKE, %rsi + movl $0x7fffffff, %edx + movq $SYS_futex, %rax + syscall + subq $wakeup_seq, %rdi + LOCK #if cond_lock == 0 decl (%rdi) |