aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/htl
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2025-01-03 12:37:46 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-01-29 02:32:36 +0100
commit2ebc2d8e24976ae9779d1d78ba8a1ed9b7b1ded7 (patch)
treecc7c81930705da35c289bcf9e8dab504e034918f /sysdeps/mach/hurd/htl
parente892a930736ba8f3c19a47dc0f46fec87da38313 (diff)
downloadglibc-2ebc2d8e24976ae9779d1d78ba8a1ed9b7b1ded7.tar.xz
glibc-2ebc2d8e24976ae9779d1d78ba8a1ed9b7b1ded7.zip
htl: move pthread_mutex_{lock, unlock, trylock, timedlock, clocklock}
I haven't exposed _pthread_mutex_lock, _pthread_mutex_trylock and _pthread_mutex_unlock in GLIBC_PRIVATE since there aren't used in any code in libpthread Message-ID: <20250103103750.870897-3-gfleury@disroot.org>
Diffstat (limited to 'sysdeps/mach/hurd/htl')
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-lock.c11
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-timedlock.c5
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-trylock.c11
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-unlock.c11
4 files changed, 24 insertions, 14 deletions
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-lock.c b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
index e1e40d8db5..7d93ddd660 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-lock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
@@ -16,13 +16,14 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <pthread.h>
+#include <pthreadP.h>
#include <stdlib.h>
#include <assert.h>
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
#include <unistd.h>
+#include <shlib-compat.h>
int
__pthread_mutex_lock (pthread_mutex_t *mtxp)
@@ -76,7 +77,9 @@ __pthread_mutex_lock (pthread_mutex_t *mtxp)
return ret;
}
+libc_hidden_def (__pthread_mutex_lock)
+versioned_symbol (libc, __pthread_mutex_lock, pthread_mutex_lock, GLIBC_2_21);
-hidden_def (__pthread_mutex_lock)
-strong_alias (__pthread_mutex_lock, _pthread_mutex_lock)
-weak_alias (__pthread_mutex_lock, pthread_mutex_lock)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_mutex_lock, pthread_mutex_lock, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
index 71ce28a319..90fa407e99 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
@@ -16,7 +16,7 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <pthread.h>
+#include <pthreadP.h>
#include <stdlib.h>
#include <assert.h>
#include <pt-internal.h>
@@ -79,6 +79,7 @@ __pthread_mutex_clocklock (pthread_mutex_t *mtxp,
return ret;
}
+libc_hidden_def (__pthread_mutex_clocklock)
weak_alias (__pthread_mutex_clocklock, pthread_mutex_clocklock)
int
@@ -87,5 +88,5 @@ __pthread_mutex_timedlock (pthread_mutex_t *mutex,
{
return __pthread_mutex_clocklock (mutex, CLOCK_REALTIME, tsp);
}
+libc_hidden_def (__pthread_mutex_timedlock)
weak_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
-hidden_def (__pthread_mutex_timedlock)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
index 5435921231..f1b451e803 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
@@ -16,13 +16,14 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <pthread.h>
+#include <pthreadP.h>
#include <stdlib.h>
#include <assert.h>
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
#include <unistd.h>
+#include <shlib-compat.h>
int
__pthread_mutex_trylock (pthread_mutex_t *mtxp)
@@ -80,7 +81,9 @@ __pthread_mutex_trylock (pthread_mutex_t *mtxp)
return ret;
}
+libc_hidden_def (__pthread_mutex_trylock)
+versioned_symbol (libc, __pthread_mutex_trylock, pthread_mutex_trylock, GLIBC_2_42);
-hidden_def (__pthread_mutex_trylock)
-strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock)
-weak_alias (__pthread_mutex_trylock, pthread_mutex_trylock)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
+compat_symbol (libc, __pthread_mutex_trylock, pthread_mutex_trylock, GLIBC_2_12);
+#endif
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
index b140416163..1732c34136 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
@@ -16,13 +16,14 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <pthread.h>
+#include <pthreadP.h>
#include <stdlib.h>
#include <assert.h>
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
#include <unistd.h>
+#include <shlib-compat.h>
int
__pthread_mutex_unlock (pthread_mutex_t *mtxp)
@@ -87,7 +88,9 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp)
return ret;
}
+libc_hidden_def (__pthread_mutex_unlock)
+versioned_symbol (libc, __pthread_mutex_unlock, pthread_mutex_unlock, GLIBC_2_21);
-hidden_def (__pthread_mutex_unlock)
-strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock)
-weak_alias (__pthread_mutex_unlock, pthread_mutex_unlock)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_mutex_unlock, pthread_mutex_unlock, GLIBC_2_12);
+#endif