]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make x86-64 pthread_cond_timedwait more robust.
authorUlrich Drepper <drepper@redhat.com>
Sun, 19 Jul 2009 21:54:56 +0000 (14:54 -0700)
committerUlrich Drepper <drepper@redhat.com>
Sun, 19 Jul 2009 21:54:56 +0000 (14:54 -0700)
It just happens that __pthread_enable_asynccancel doesn't modify the $rdi
register.  But this isn't guaranteed.  Hence we reload the register after
the calls.

nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S

index e9cac734596039cda92eb8008963b4972e52a0e8..785100d8529f0fdcc1eb5a6764451192b753bbbc 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-19  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+       (__pthread_cond_timedwait): Make more robust.
+
 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
index 45a9a4213b4f93ca3cdc47aa1e4d56970b56bd17..1b19fdb8dc28aabd3dfd4c468e041ac963763f4d 100644 (file)
@@ -153,6 +153,7 @@ __pthread_cond_timedwait:
 .LcleanupSTART1:
 34:    callq   __pthread_enable_asynccancel
        movl    %eax, (%rsp)
+       movq    8(%rsp), %rdi
 
        movq    %r13, %r10
        cmpq    $-1, dep_mutex(%rdi)
@@ -456,6 +457,7 @@ __pthread_cond_timedwait:
 .LcleanupSTART2:
 4:     callq   __pthread_enable_asynccancel
        movl    %eax, (%rsp)
+       movq    8(%rsp), %rdi
 
        leaq    32(%rsp), %r10
        cmpq    $-1, dep_mutex(%rdi)