about summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdlock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hurd/hurdlock.c b/hurd/hurdlock.c
index 50da0a2121..59d017fc02 100644
--- a/hurd/hurdlock.c
+++ b/hurd/hurdlock.c
@@ -47,6 +47,9 @@ int
 __lll_abstimed_wait (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 (ptr, val, mlsec, flags);
 }
@@ -55,6 +58,9 @@ int
 __lll_abstimed_xwait (void *ptr, int lo, int hi,
   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_xwait (ptr, lo, hi, mlsec,
 	                                              flags);
@@ -64,6 +70,9 @@ int
 __lll_abstimed_lock (void *ptr,
   const struct timespec *tsp, int flags, int clk)
 {
+  if (clk != CLOCK_REALTIME)
+    return EINVAL;
+
   if (lll_trylock (ptr) == 0)
     return 0;
 
@@ -147,6 +156,9 @@ __lll_robust_abstimed_lock (void *ptr,
   int wait_time = 25;
   unsigned int val;
 
+  if (clk != CLOCK_REALTIME)
+    return EINVAL;
+
   while (1)
     {
       val = *iptr;