[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd,commited 2/4] hurd: Add CLOCK_MONOTONIC support to lll
From: |
Samuel Thibault |
Subject: |
[hurd,commited 2/4] hurd: Add CLOCK_MONOTONIC support to lll |
Date: |
Sun, 12 Jan 2025 23:32:52 +0100 |
---
hurd/hurdlock.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hurd/hurdlock.c b/hurd/hurdlock.c
index a97144348c..374e4d107a 100644
--- a/hurd/hurdlock.c
+++ b/hurd/hurdlock.c
@@ -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)
--
2.45.2
- [hurd,commited 0/4] hurd: CLOCK_MONOTONIC support, Samuel Thibault, 2025/01/12
- [hurd, commited 1/4] mach: Add CLOCK_MONOTONIC case in clock_gettime(), Samuel Thibault, 2025/01/12
- [hurd,commited 4/4] hurd: Set _POSIX_MONOTONIC_CLOCK to 200809L, Samuel Thibault, 2025/01/12
- [hurd,commited 2/4] hurd: Add CLOCK_MONOTONIC support to lll,
Samuel Thibault <=
- [hurd,commited 3/4] hurd: Add CLOCK_MONOTONIC to clock_nanosleep, Samuel Thibault, 2025/01/12