summaryrefslogtreecommitdiff
path: root/sysdeps/nptl/lowlevellock-futex.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-10-30 13:29:40 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-10-31 11:09:10 -0300
commit6b1472eb2ea16f99c4729f975ca25af980ce3894 (patch)
tree14cd1db1ac52188e91e81ab3ef3a93735d1683be /sysdeps/nptl/lowlevellock-futex.h
parentfbb4a3143724ef3f044a4f05351fe041300ee382 (diff)
downloadglibc-6b1472eb2ea16f99c4729f975ca25af980ce3894.tar.gz
Refactor PI mutexes internal definitions
This patch adds the generic futex_lock_pi and futex_unlock_pi to wrap around the syscall machinery required to issue the syscall calls. It simplifies a bit the futex code required to implement PI mutexes. No function changes, checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/nptl/lowlevellock-futex.h')
-rw-r--r--sysdeps/nptl/lowlevellock-futex.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
index 392277e8a5..ff0fd4edc4 100644
--- a/sysdeps/nptl/lowlevellock-futex.h
+++ b/sysdeps/nptl/lowlevellock-futex.h
@@ -140,6 +140,15 @@
/* Priority Inheritance support. */
+#define lll_futex_timed_lock_pi(futexp, abstime, private) \
+ lll_futex_syscall (4, futexp, \
+ __lll_private_flag (FUTEX_LOCK_PI, private), \
+ 0, abstime)
+
+#define lll_futex_timed_unlock_pi(futexp, private) \
+ lll_futex_syscall (4, futexp, \
+ __lll_private_flag (FUTEX_UNLOCK_PI, private), \
+ 0, 0)
/* Like lll_futex_wait (FUTEXP, VAL, PRIVATE) but with the expectation
that lll_futex_cmp_requeue_pi (FUTEXP, _, _, MUTEX, _, PRIVATE) will