public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: Let libc call __pthread_mutex_{,try,un}lock
@ 2021-07-13 21:37 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2021-07-13 21:37 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c27bcc95880934481fc1a128486e93447de6a0dd
commit c27bcc95880934481fc1a128486e93447de6a0dd
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Tue Jul 13 21:33:39 2021 +0000
htl: Let libc call __pthread_mutex_{,try,un}lock
Now that NPTL was moved to libc, libc makes internal __pthread calls, so
htl has to expose them internally.
Diff:
---
htl/Versions | 1 +
sysdeps/htl/pthreadP.h | 3 +++
sysdeps/mach/hurd/htl/pt-mutex-lock.c | 1 +
sysdeps/mach/hurd/htl/pt-mutex-trylock.c | 1 +
sysdeps/mach/hurd/htl/pt-mutex-unlock.c | 1 +
5 files changed, 7 insertions(+)
diff --git a/htl/Versions b/htl/Versions
index 9506043c62..4aea321016 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -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;
}
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 3b357b7bdc..7b3f969a3b 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -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);
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-lock.c b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
index e32066b777..5214489533 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-lock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
@@ -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)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
index 5aa39ab00c..1be451ac96 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
@@ -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)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
index 35fa77d42a..74ae51eb64 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
@@ -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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-13 21:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 21:37 [glibc] htl: Let libc call __pthread_mutex_{,try,un}lock Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).