summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-11-30 14:53:29 +0100
committerAndreas Schwab <schwab@redhat.com>2009-11-30 14:54:41 +0100
commit488fb43a499982e99915c78bb70f04357ac37463 (patch)
treee356d0f1d327ed3de4a9d5abec1edf346070aa32 /nptl
parenteab709096f23a4511adfc547450a83008eae5fb2 (diff)
parent20af204581e1ba42738c1bfb69cc2f5350f4ffa4 (diff)
Merge branch 'release/2.11/master' into fedora/2.11/master
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog12
-rw-r--r--nptl/sysdeps/pthread/unwind-forcedunwind.c5
-rw-r--r--nptl/sysdeps/pthread/unwind-resume.c5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S5
4 files changed, 21 insertions, 6 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index f11a47dd0b..a06b456728 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-27 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
+ THREAD_SELF->cancelhandling after returning from futex call.
+
+2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
+
+ [BZ #4457]
+ * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
+ LIBGCC_S_SO.
+ * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
+
2009-10-30 Ulrich Drepper <drepper@redhat.com>
* tst-sem11.c (main): Rewrite to avoid aliasing problems.
diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c
index 402591f6e4..ae43f335e7 100644
--- a/nptl/sysdeps/pthread/unwind-forcedunwind.c
+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c
@@ -22,6 +22,7 @@
#include <unwind.h>
#include <pthreadP.h>
#include <sysdep.h>
+#include <libgcc_s.h>
static void *libgcc_s_handle;
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
@@ -49,7 +50,7 @@ pthread_cancel_init (void)
return;
}
- handle = __libc_dlopen ("libgcc_s.so.1");
+ handle = __libc_dlopen (LIBGCC_S_SO);
if (handle == NULL
|| (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
@@ -61,7 +62,7 @@ pthread_cancel_init (void)
|| ARCH_CANCEL_INIT (handle)
#endif
)
- __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+ __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
PTR_MANGLE (resume);
libgcc_s_resume = resume;
diff --git a/nptl/sysdeps/pthread/unwind-resume.c b/nptl/sysdeps/pthread/unwind-resume.c
index 088f4c6f6c..69f3e04c43 100644
--- a/nptl/sysdeps/pthread/unwind-resume.c
+++ b/nptl/sysdeps/pthread/unwind-resume.c
@@ -20,6 +20,7 @@
#include <dlfcn.h>
#include <stdio.h>
#include <unwind.h>
+#include <libgcc_s.h>
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
static _Unwind_Reason_Code (*libgcc_s_personality)
@@ -32,12 +33,12 @@ init (void)
void *resume, *personality;
void *handle;
- handle = __libc_dlopen ("libgcc_s.so.1");
+ handle = __libc_dlopen (LIBGCC_S_SO);
if (handle == NULL
|| (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
|| (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
- __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+ __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
libgcc_s_resume = resume;
libgcc_s_personality = personality;
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
index 0d48ec6fcd..680696200a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
@@ -96,8 +96,8 @@ ENTRY(__pthread_disable_asynccancel)
cmpxchgl %r11d, %fs:CANCELHANDLING
jnz 2b
-3: movl %r11d, %eax
- andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
+ movl %r11d, %eax
+3: andl $(TCB_CANCELING_BITMASK|TCB_CANCELED_BITMASK), %eax
cmpl $TCB_CANCELING_BITMASK, %eax
je 4f
1: ret
@@ -111,5 +111,6 @@ ENTRY(__pthread_disable_asynccancel)
addq $CANCELHANDLING, %rdi
LOAD_PRIVATE_FUTEX_WAIT (%esi)
syscall
+ movl %fs:CANCELHANDLING, %eax
jmp 3b
END(__pthread_disable_asynccancel)