]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
htl: Add internal version of __pthread_mutex_timedlock
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 13 Jan 2020 19:41:07 +0000 (20:41 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 13 Jan 2020 19:41:07 +0000 (20:41 +0100)
The C11 threads implementation will need it.

htl/Versions
sysdeps/htl/pt-mutex-timedlock.c
sysdeps/htl/pthreadP.h
sysdeps/mach/hurd/htl/pt-mutex-timedlock.c

index 1c306acf5c7808b632f44d274ffe8191cbff7aee..77f7335b9ce39be89956854b3da093cf005e2f9b 100644 (file)
@@ -155,5 +155,6 @@ libpthread {
     __pthread_setspecific;
     __pthread_getattr_np;
     __pthread_attr_getstack;
+    __pthread_mutex_timedlock;
   }
 }
index d0ebb2975ef0562353c57bc75e0a6b852e0f7d42..0e50f38ef2cb16ebe2b71121055c726d331f3734 100644 (file)
@@ -189,8 +189,9 @@ __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex,
 }
 
 int
-pthread_mutex_timedlock (struct __pthread_mutex *mutex,
+__pthread_mutex_timedlock (struct __pthread_mutex *mutex,
                         const struct timespec *abstime)
 {
   return __pthread_mutex_timedlock_internal (mutex, abstime);
 }
+strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
index af0154538ab1b7b6cf05508946455f82ea1df3e9..affe7cdf53a652f632fdcdd459f614ca361c99c5 100644 (file)
@@ -29,6 +29,8 @@ extern struct __pthread **__pthread_threads;
 
 extern int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr);
 extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
+     const struct timespec *__abstime);
 extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
 
 extern int __pthread_cond_broadcast (pthread_cond_t *cond);
index 13136ddfe164a868d024f39ea5c94f4b8b572cf8..e83bc5787565a1cd91405120d9d87326d237f3b1 100644 (file)
@@ -24,7 +24,7 @@
 #include <hurdlock.h>
 
 int
-pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
+__pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
 {
   struct __pthread *self;
   int ret, flags = mtxp->__flags & GSYNC_SHARED;
@@ -76,3 +76,4 @@ pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
 
   return ret;
 }
+strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)