aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/htl')
-rw-r--r--sysdeps/htl/sem-timedwait.c12
-rw-r--r--sysdeps/htl/sem-wait.c3
2 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/htl/sem-timedwait.c b/sysdeps/htl/sem-timedwait.c
index 2d8cf25..0b1b6d0 100644
--- a/sysdeps/htl/sem-timedwait.c
+++ b/sysdeps/htl/sem-timedwait.c
@@ -25,12 +25,12 @@
int
__sem_timedwait_internal (sem_t *restrict sem,
+ clockid_t clock_id,
const struct timespec *restrict timeout)
{
error_t err;
int drain;
struct __pthread *self;
- clockid_t clock_id = CLOCK_REALTIME;
__pthread_spin_wait (&sem->__lock);
if (sem->__value > 0)
@@ -89,9 +89,17 @@ __sem_timedwait_internal (sem_t *restrict sem,
}
int
+__sem_clockwait (sem_t *sem, clockid_t clockid,
+ const struct timespec *restrict timeout)
+{
+ return __sem_timedwait_internal (sem, clockid, timeout);
+}
+weak_alias (__sem_clockwait, sem_clockwait);
+
+int
__sem_timedwait (sem_t *restrict sem, const struct timespec *restrict timeout)
{
- return __sem_timedwait_internal (sem, timeout);
+ return __sem_timedwait_internal (sem, CLOCK_REALTIME, timeout);
}
weak_alias (__sem_timedwait, sem_timedwait);
diff --git a/sysdeps/htl/sem-wait.c b/sysdeps/htl/sem-wait.c
index 1db2d90..74b39d5 100644
--- a/sysdeps/htl/sem-wait.c
+++ b/sysdeps/htl/sem-wait.c
@@ -20,12 +20,13 @@
#include <pt-internal.h>
extern int __sem_timedwait_internal (sem_t *restrict sem,
+ clockid_t clockid,
const struct timespec *restrict timeout);
int
__sem_wait (sem_t *sem)
{
- return __sem_timedwait_internal (sem, 0);
+ return __sem_timedwait_internal (sem, CLOCK_REALTIME, 0);
}
strong_alias (__sem_wait, sem_wait);