diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S index 7065cfac32..a5ad88c199 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S @@ -199,14 +199,16 @@ __lll_timedlock_wait: addq $1000000000, %rsi decq %rdi 4: testq %rdi, %rdi - js 5f /* Time is already up. */ + movq $-ETIMEDOUT, %rcx + movl $2, %edx + js 8f /* Time is already up. */ /* Futex call. */ movq %rdi, (%rsp) /* Store relative timeout. */ movq %rsi, 8(%rsp) movl $1, %eax - movl $2, %edx + /* NB: $edx has been loaded early. */ LOCK cmpxchgl %edx, (%r12) |