diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-25 17:15:51 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-11-27 09:59:13 -0300 |
commit | 71eeae0325a95f5e5d7ec4a27a6a6c357e0c8ef4 (patch) | |
tree | 470fe6a8c1ab863ad0c400d6e19924c2d265ac68 /nptl/tst-mutexpp9.c | |
parent | 9ff2674ef82eccd5ae5dfa6bb733c0e3613764c6 (diff) | |
download | glibc-71eeae0325a95f5e5d7ec4a27a6a6c357e0c8ef4.zip glibc-71eeae0325a95f5e5d7ec4a27a6a6c357e0c8ef4.tar.gz glibc-71eeae0325a95f5e5d7ec4a27a6a6c357e0c8ef4.tar.bz2 |
nptl: Fix PTHREAD_PRIO_PROTECT timed lock
The 878fe624d4 changed lll_futex_timed_wait, which expects a relative
timeout, with a __futex_abstimed_wait64, which expects an absolute
timeout. However the code still passes a relative timeout.
Also, the PTHREAD_PRIO_PROTECT support for clocks different than
CLOCK_REALTIME was broken since the inclusion of
pthread_mutex_clocklock (9d20e22e46) since lll_futex_timed_wait
always use CLOCK_REALTIME.
This patch fixes by removing the relative time calculation. It
also adds some xtests that tests both thread and inter-process
usage.
Checked on x86_64-linux-gnu.
Diffstat (limited to 'nptl/tst-mutexpp9.c')
-rw-r--r-- | nptl/tst-mutexpp9.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nptl/tst-mutexpp9.c b/nptl/tst-mutexpp9.c new file mode 100644 index 0000000..c848c74 --- /dev/null +++ b/nptl/tst-mutexpp9.c @@ -0,0 +1,2 @@ +#define ENABLE_PP 1 +#include "tst-mutex9.c" |