aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgfleury <gfleury@disroot.org>2024-12-19 22:37:26 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-22 23:34:28 +0100
commitba8522542fc2f1fa0a928432be91b9456ad745da (patch)
tree2d3f89017440733973acd0ade3e576bff47feeca
parenta369d567d206d04a7c56b388b829424046309b95 (diff)
downloadglibc-ba8522542fc2f1fa0a928432be91b9456ad745da.zip
glibc-ba8522542fc2f1fa0a928432be91b9456ad745da.tar.gz
glibc-ba8522542fc2f1fa0a928432be91b9456ad745da.tar.bz2
htl: move __pthread_mutex_checklocked into libc.
move out __getpid from pt-mutex.h and in pt-mutex-* include <unistd.h> where __getpid was called Signed-off-by: gfleury <gfleury@disroot.org> Message-ID: <20241219203727.669825-8-gfleury@disroot.org>
-rw-r--r--htl/Makefile2
-rw-r--r--htl/Versions1
-rw-r--r--htl/pt-internal.h1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-checklocked.c2
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-consistent.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-lock.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-timedlock.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-trylock.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex-unlock.c1
-rw-r--r--sysdeps/mach/hurd/htl/pt-mutex.h2
11 files changed, 11 insertions, 3 deletions
diff --git a/htl/Makefile b/htl/Makefile
index 683ca4b..1c454d4 100644
--- a/htl/Makefile
+++ b/htl/Makefile
@@ -68,7 +68,6 @@ libpthread-routines := \
pt-mutexattr-setrobust \
pt-mutex-init \
pt-mutex-destroy \
- pt-mutex-checklocked \
pt-mutex-lock \
pt-mutex-trylock \
pt-mutex-timedlock \
@@ -201,6 +200,7 @@ routines := \
pt-condattr-setclock \
pt-condattr-setpshared \
pt-getschedparam \
+ pt-mutex-checklocked \
pt-nthreads \
pt-pthread_self \
pt-self pt-equal \
diff --git a/htl/Versions b/htl/Versions
index 3fa6b93..95cf7fe 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -106,6 +106,7 @@ libc {
__pthread_cond_signal;
__pthread_condattr_init;
__pthread_default_condattr;
+ __pthread_mutex_checklocked;
__pthread_sigstate;
__pthread_sigstate_destroy;
__pthread_sigmask;
diff --git a/htl/pt-internal.h b/htl/pt-internal.h
index 1e4d92d..ec71fe1 100644
--- a/htl/pt-internal.h
+++ b/htl/pt-internal.h
@@ -319,6 +319,7 @@ libc_hidden_proto (__pthread_sigstate)
/* If supported, check that MUTEX is locked by the caller. */
extern int __pthread_mutex_checklocked (pthread_mutex_t *mtx);
+libc_hidden_proto (__pthread_mutex_checklocked)
/* Default thread attributes. */
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-checklocked.c b/sysdeps/mach/hurd/htl/pt-mutex-checklocked.c
index c6afa0d..2a3ce3c 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-checklocked.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-checklocked.c
@@ -22,6 +22,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
__pthread_mutex_checklocked (pthread_mutex_t *mtxp)
@@ -49,3 +50,4 @@ __pthread_mutex_checklocked (pthread_mutex_t *mtxp)
return ret;
}
+libc_hidden_def (__pthread_mutex_checklocked)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c
index bd41eb2..56b1103 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-consistent.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-consistent.c
@@ -22,6 +22,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
pthread_mutex_consistent (pthread_mutex_t *mtxp)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-lock.c b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
index 3df26f4..12dae49 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-lock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-lock.c
@@ -22,6 +22,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
__pthread_mutex_lock (pthread_mutex_t *mtxp)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
index 30aff2c..11cea03 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
@@ -22,6 +22,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
__pthread_mutex_clocklock (pthread_mutex_t *mtxp,
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
index d3aaaad..c66a97b 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
@@ -23,6 +23,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
__pthread_mutex_transfer_np (pthread_mutex_t *mtxp, pthread_t th)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
index c232dc7..3458945 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c
@@ -22,6 +22,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
__pthread_mutex_trylock (pthread_mutex_t *mtxp)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
index e85ba2c..238728e 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c
@@ -22,6 +22,7 @@
#include <pt-internal.h>
#include "pt-mutex.h"
#include <hurdlock.h>
+#include <unistd.h>
int
__pthread_mutex_unlock (pthread_mutex_t *mtxp)
diff --git a/sysdeps/mach/hurd/htl/pt-mutex.h b/sysdeps/mach/hurd/htl/pt-mutex.h
index d9b7eec..ca56944 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex.h
+++ b/sysdeps/mach/hurd/htl/pt-mutex.h
@@ -85,6 +85,4 @@
#define MTX_TYPE(mtxp) \
((mtxp)->__type | ((mtxp)->__flags & PTHREAD_MUTEX_ROBUST))
-extern int __getpid (void) __attribute__ ((const));
-
#endif /* pt-mutex.h */