Hi,
Here's the patch with comments updated as per Torvald's suggestion.
For context on the patch, please see the following discussion:
http://sourceware.org/ml/libc-alpha/2012-09/msg00557.html
I held back on the abort code for now following Jeff's comment. Does
this look OK?
Regards,
Siddhesh
nptl/ChangeLog:
* Makefile (tests): New test case tst-cond24.
(LDFLAGS-tst-cond24): Link tst-cond24 against librt.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
(__pthread_cond_timedwait): Unlock mutex before going back to
wait in PI case.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
(__pthread_cond_wait): Likewise. Revert handling of EAGAIN
return from futex_wait.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
(__pthread_cond_timedwait): Unlock mutex before going back to
wait in PI case. Set requeue_pi flag only if wait returned 0.
* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
(__pthread_cond_wait): Likewise. Revert handling of EAGAIN
return from futex_wait.
* tst-cond24.c: New test case.