]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Add CLOCK_MONOTONIC support to lll
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 12 Jan 2025 21:39:20 +0000 (22:39 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 12 Jan 2025 21:47:00 +0000 (22:47 +0100)
hurd/hurdlock.c

index a97144348c346beec2f0cf8b00de1406d617fe53..374e4d107ac0e42b1bdecb49d92d45a307c4dcff 100644 (file)
@@ -47,7 +47,7 @@ int
 __lll_abstimed_wait (void *ptr, int val,
   const struct timespec *tsp, int flags, int clk)
 {
-  if (clk != CLOCK_REALTIME)
+  if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC)
     return EINVAL;
 
   int mlsec = compute_reltime (tsp, clk);
@@ -58,7 +58,7 @@ int
 __lll_abstimed_wait_intr (void *ptr, int val,
   const struct timespec *tsp, int flags, int clk)
 {
-  if (clk != CLOCK_REALTIME)
+  if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC)
     return EINVAL;
 
   int mlsec = compute_reltime (tsp, clk);
@@ -69,7 +69,7 @@ int
 __lll_abstimed_xwait (void *ptr, int lo, int hi,
   const struct timespec *tsp, int flags, int clk)
 {
-  if (clk != CLOCK_REALTIME)
+  if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC)
     return EINVAL;
 
   int mlsec = compute_reltime (tsp, clk);
@@ -81,7 +81,7 @@ int
 __lll_abstimed_lock (void *ptr,
   const struct timespec *tsp, int flags, int clk)
 {
-  if (clk != CLOCK_REALTIME)
+  if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC)
     return EINVAL;
 
   if (__lll_trylock (ptr) == 0)
@@ -167,7 +167,7 @@ __lll_robust_abstimed_lock (void *ptr,
   int wait_time = 25;
   unsigned int val;
 
-  if (clk != CLOCK_REALTIME)
+  if (clk != CLOCK_REALTIME && clk != CLOCK_MONOTONIC)
     return EINVAL;
 
   while (1)