]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
htl: move __pthread_mutex_checklocked into libc.
authorgfleury <gfleury@disroot.org>
Thu, 19 Dec 2024 20:37:26 +0000 (22:37 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 22 Dec 2024 22:34:28 +0000 (23:34 +0100)
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>

htl/Makefile
htl/Versions
htl/pt-internal.h
sysdeps/mach/hurd/htl/pt-mutex-checklocked.c
sysdeps/mach/hurd/htl/pt-mutex-consistent.c
sysdeps/mach/hurd/htl/pt-mutex-lock.c
sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
sysdeps/mach/hurd/htl/pt-mutex-transfer-np.c
sysdeps/mach/hurd/htl/pt-mutex-trylock.c
sysdeps/mach/hurd/htl/pt-mutex-unlock.c
sysdeps/mach/hurd/htl/pt-mutex.h

index 683ca4bc4efca3e28b4995cfd2743c2edcbe3b54..1c454d4d3ef6d093c4b291bff212f3bba30a3bef 100644 (file)
@@ -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 \
index 3fa6b936a2c542060908109ce9fb2ace0b9a6cd0..95cf7fe4c28a15cdfb02d704c9a61929b44b5182 100644 (file)
@@ -106,6 +106,7 @@ libc {
     __pthread_cond_signal;
     __pthread_condattr_init;
     __pthread_default_condattr;
+    __pthread_mutex_checklocked;
     __pthread_sigstate;
     __pthread_sigstate_destroy;
     __pthread_sigmask;
index 1e4d92d0d7415b8388089d456f3fa1315705af11..ec71fe1867f986bddc993905554166cb368f0311 100644 (file)
@@ -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)
 \f
 
 /* Default thread attributes.  */
index c6afa0d3eff8236fc4cb7bbeccc3c66c004efb70..2a3ce3c54522ffab9d30ee59967ba017ec8f67db 100644 (file)
@@ -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)
index bd41eb23c18b230e94823ac86c3fe33ed13d10d3..56b110333223a4b5f15b46d93c200ca1ffc39a4d 100644 (file)
@@ -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)
index 3df26f4344ffa04a3e5ba286ee0bd56bfb9f21b2..12dae49cf23d41d9b345f1d17966734eaffffb80 100644 (file)
@@ -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)
index 30aff2c411d1799062d942258776a0693394d67f..11cea03da03fa42c2a95daec149b2e8c83035daa 100644 (file)
@@ -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,
index d3aaaadd54cd59c8631ea599df0a0bb9bc97b4cf..c66a97b4fde1c1265b9141c466bff2570b2a5cfa 100644 (file)
@@ -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)
index c232dc7a4f04cc1254b659c89fabd29740f14733..34589459bb6832118cd14ce2e6c6ca034610b5f0 100644 (file)
@@ -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)
index e85ba2c8ca0da6b5da321ce21058dce1fec58082..238728e4715f0d73e7b869f69fff8a893bed1ef5 100644 (file)
@@ -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)
index d9b7eec29ea5fb482429aa0e0dfc0f07576fd221..ca569447189d7e99b76ae9d454329c1f606de30c 100644 (file)
@@ -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 */