about summary refs log tree commit diff
path: root/hurd/hurdlock.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-12-13 11:01:52 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-12-16 01:58:33 +0100
commit59bb023c8361c0e12e8eee1810897c5e3ea223b3 (patch)
tree1b0ac0698b6f01aa8c69d0960f9bc1f49ec62f03 /hurd/hurdlock.c
parentbec412424e949c900b01767ce32b6743bdaaac93 (diff)
downloadglibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.tar.gz
glibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.tar.xz
glibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.zip
hurd: Add __lll_abstimed_wait_intr
For semaphores, we need an interruptible version of low-level locks.
Diffstat (limited to 'hurd/hurdlock.c')
-rw-r--r--hurd/hurdlock.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hurd/hurdlock.c b/hurd/hurdlock.c
index 3b9974bee5..e2a5312036 100644
--- a/hurd/hurdlock.c
+++ b/hurd/hurdlock.c
@@ -55,6 +55,17 @@ __lll_abstimed_wait (void *ptr, int val,
 }
 
 int
+__lll_abstimed_wait_intr (void *ptr, int val,
+  const struct timespec *tsp, int flags, int clk)
+{
+  if (clk != CLOCK_REALTIME)
+    return EINVAL;
+
+  int mlsec = compute_reltime (tsp, clk);
+  return mlsec < 0 ? KERN_TIMEDOUT : __lll_timed_wait_intr (ptr, val, mlsec, flags);
+}
+
+int
 __lll_abstimed_xwait (void *ptr, int lo, int hi,
   const struct timespec *tsp, int flags, int clk)
 {