htl: Let libc call __pthread_mutex_{,try,un}lock
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 13 Jul 2021 21:33:39 +0000 (21:33 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 13 Jul 2021 21:36:58 +0000 (23:36 +0200)
Now that NPTL was moved to libc, libc makes internal __pthread calls, so
htl has to expose them internally.

htl/Versions
sysdeps/htl/pthreadP.h
sysdeps/mach/hurd/htl/pt-mutex-lock.c
sysdeps/mach/hurd/htl/pt-mutex-trylock.c
sysdeps/mach/hurd/htl/pt-mutex-unlock.c

index 9506043c620f084e38b489bcdfaf297fe89d9375..4aea3210164fb8e07a4a983900d530b74210e97f 100644 (file)
@@ -187,6 +187,7 @@ libpthread {
     __pthread_enable_asynccancel;
     __pthread_disable_asynccancel;
 
+    __pthread_mutex_lock; __pthread_mutex_trylock; __pthread_mutex_unlock;
     _pthread_mutex_lock; _pthread_mutex_trylock; _pthread_mutex_unlock;
     _pthread_rwlock_destroy; _pthread_rwlock_init;
   }
index 3b357b7bdc459cf706a854605634de4ad00169cb..7b3f969a3bd12b857cbb7ee8de44f5de70dadb1a 100644 (file)
@@ -36,10 +36,13 @@ extern struct __pthread **__pthread_threads;
 extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__attr);
 extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
 extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+hidden_proto (__pthread_mutex_lock)
 extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
+hidden_proto (__pthread_mutex_trylock)
 extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
      const struct timespec *__abstime);
 extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
+hidden_proto (__pthread_mutex_unlock)
 extern int __pthread_mutexattr_init (pthread_mutexattr_t *attr);
 extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind);
 
index e32066b7775d5930c2e27d29b1b9fdf77e605649..521448953328d5550ff0227df41eb6b498865462 100644 (file)
@@ -76,5 +76,6 @@ __pthread_mutex_lock (pthread_mutex_t *mtxp)
   return ret;
 }
 
+hidden_def (__pthread_mutex_lock)
 strong_alias (__pthread_mutex_lock, _pthread_mutex_lock)
 weak_alias (__pthread_mutex_lock, pthread_mutex_lock)
index 5aa39ab00c177e19103b0de8d7f0e159dc1b58b8..1be451ac966020178bf144c0d44b30f3eea7d8ac 100644 (file)
@@ -80,5 +80,6 @@ __pthread_mutex_trylock (pthread_mutex_t *mtxp)
   return ret;
 }
 
+hidden_def (__pthread_mutex_trylock)
 strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock)
 weak_alias (__pthread_mutex_trylock, pthread_mutex_trylock)
index 35fa77d42abe2f55e0932526737d157c55d0c519..74ae51eb641443ca2a1550078e6a6112995f4721 100644 (file)
@@ -87,5 +87,6 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp)
   return ret;
 }
 
+hidden_def (__pthread_mutex_unlock)
 strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock)
 weak_alias (__pthread_mutex_unlock, pthread_mutex_unlock)