1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-10 05:03:06 +03:00

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>
This commit is contained in:
gfleury
2025-01-03 12:37:46 +02:00
committed by Samuel Thibault
parent e892a93073
commit 2ebc2d8e24
18 changed files with 78 additions and 66 deletions

View File

@@ -55,10 +55,6 @@ libpthread-routines := \
pt-testcancel \ pt-testcancel \
pt-cancel \ pt-cancel \
pt-mutex-destroy \ pt-mutex-destroy \
pt-mutex-lock \
pt-mutex-trylock \
pt-mutex-timedlock \
pt-mutex-unlock \
pt-mutex-transfer-np \ pt-mutex-transfer-np \
pt-mutex-getprioceiling \ pt-mutex-getprioceiling \
pt-mutex-setprioceiling \ pt-mutex-setprioceiling \
@@ -189,6 +185,10 @@ routines := \
pt-getschedparam \ pt-getschedparam \
pt-mutex-checklocked \ pt-mutex-checklocked \
pt-mutex-init \ pt-mutex-init \
pt-mutex-lock \
pt-mutex-timedlock \
pt-mutex-trylock \
pt-mutex-unlock \
pt-mutexattr-destroy \ pt-mutexattr-destroy \
pt-mutexattr-getprioceiling \ pt-mutexattr-getprioceiling \
pt-mutexattr-getprotocol \ pt-mutexattr-getprotocol \

View File

@@ -39,6 +39,10 @@ libc {
pthread_condattr_setclock; pthread_condattr_setclock;
pthread_condattr_setpshared; pthread_condattr_setpshared;
pthread_mutex_init; pthread_mutex_init;
pthread_mutex_lock;
pthread_mutex_timedlock;
pthread_mutex_trylock;
pthread_mutex_unlock;
pthread_mutexattr_destroy; pthread_mutexattr_destroy;
pthread_mutexattr_getprioceiling; pthread_mutexattr_getprioceiling;
pthread_mutexattr_getprotocol; pthread_mutexattr_getprotocol;
@@ -66,7 +70,7 @@ libc {
pthread_equal; pthread_equal;
pthread_exit; pthread_getschedparam; pthread_setschedparam; pthread_exit; pthread_getschedparam; pthread_setschedparam;
pthread_mutex_destroy; pthread_mutex_init; pthread_mutex_destroy; pthread_mutex_init;
pthread_mutex_lock; pthread_mutex_trylock; pthread_mutex_unlock; pthread_mutex_lock; pthread_mutex_unlock;
pthread_self; pthread_setcancelstate; pthread_setcanceltype; pthread_self; pthread_setcancelstate; pthread_setcanceltype;
__pthread_get_cleanup_stack; __pthread_get_cleanup_stack;
} }
@@ -80,6 +84,8 @@ libc {
pthread_cond_clockwait; pthread_cond_clockwait;
pthread_mutex_clocklock;
pthread_mutexattr_getrobust; pthread_mutexattr_getrobust_np; pthread_mutexattr_getrobust; pthread_mutexattr_getrobust_np;
pthread_mutexattr_setrobust; pthread_mutexattr_setrobust_np; pthread_mutexattr_setrobust; pthread_mutexattr_setrobust_np;
} }
@@ -110,6 +116,9 @@ libc {
pthread_sigmask; pthread_sigmask;
} }
GLIBC_2.42 {
pthread_mutex_trylock;
}
GLIBC_PRIVATE { GLIBC_PRIVATE {
__libc_alloca_cutoff; __libc_alloca_cutoff;
@@ -139,6 +148,10 @@ libc {
__pthread_default_condattr; __pthread_default_condattr;
__pthread_mutex_checklocked; __pthread_mutex_checklocked;
__pthread_mutex_init; __pthread_mutex_init;
__pthread_mutex_lock;
__pthread_mutex_timedlock;
__pthread_mutex_trylock;
__pthread_mutex_unlock;
__pthread_mutexattr_destroy; __pthread_mutexattr_destroy;
__pthread_mutexattr_init; __pthread_mutexattr_init;
__pthread_mutexattr_settype; __pthread_mutexattr_settype;
@@ -198,9 +211,8 @@ libpthread {
__pthread_kill; __pthread_kill;
pthread_mutex_destroy; pthread_mutex_getprioceiling; pthread_mutex_destroy; pthread_mutex_getprioceiling;
pthread_mutex_lock; pthread_mutex_setprioceiling; pthread_mutex_setprioceiling;
pthread_mutex_timedlock; pthread_mutex_transfer_np; pthread_mutex_transfer_np;
pthread_mutex_trylock; pthread_mutex_unlock;
pthread_once; pthread_once;
@@ -242,7 +254,6 @@ libpthread {
tss_create; tss_delete; tss_get; tss_set; tss_create; tss_delete; tss_get; tss_set;
pthread_mutex_consistent; pthread_mutex_consistent_np; pthread_mutex_consistent; pthread_mutex_consistent_np;
pthread_mutex_clocklock;
pthread_rwlock_clockrdlock; pthread_rwlock_clockwrlock; pthread_rwlock_clockrdlock; pthread_rwlock_clockwrlock;
@@ -270,12 +281,8 @@ libpthread {
__pthread_setspecific; __pthread_setspecific;
__pthread_getattr_np; __pthread_getattr_np;
__pthread_mutex_destroy; __pthread_mutex_destroy;
__pthread_mutex_timedlock;
__pthread_enable_asynccancel; __pthread_enable_asynccancel;
__pthread_disable_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; _pthread_rwlock_destroy; _pthread_rwlock_init;
} }
} }

View File

@@ -60,10 +60,6 @@ strong_alias (__pthread_exit, pthread_exit);
FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0) FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0)
FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0)
FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
FORWARD (__pthread_setcancelstate, (int state, int *oldstate), FORWARD (__pthread_setcancelstate, (int state, int *oldstate),
(state, oldstate), 0) (state, oldstate), 0)
strong_alias (__pthread_setcancelstate, pthread_setcancelstate); strong_alias (__pthread_setcancelstate, pthread_setcancelstate);

View File

@@ -29,9 +29,6 @@
static const struct pthread_functions pthread_functions = { static const struct pthread_functions pthread_functions = {
.ptr___pthread_exit = __pthread_exit, .ptr___pthread_exit = __pthread_exit,
.ptr_pthread_mutex_destroy = __pthread_mutex_destroy, .ptr_pthread_mutex_destroy = __pthread_mutex_destroy,
.ptr_pthread_mutex_lock = __pthread_mutex_lock,
.ptr_pthread_mutex_trylock = __pthread_mutex_trylock,
.ptr_pthread_mutex_unlock = __pthread_mutex_unlock,
.ptr___pthread_setcancelstate = __pthread_setcancelstate, .ptr___pthread_setcancelstate = __pthread_setcancelstate,
.ptr_pthread_setcanceltype = __pthread_setcanceltype, .ptr_pthread_setcanceltype = __pthread_setcanceltype,
.ptr___pthread_get_cleanup_stack = __pthread_get_cleanup_stack, .ptr___pthread_get_cleanup_stack = __pthread_get_cleanup_stack,

View File

@@ -99,6 +99,7 @@ __lll_abstimed_lock (void *ptr,
return ETIMEDOUT; return ETIMEDOUT;
} }
} }
libc_hidden_def (__lll_abstimed_lock)
/* Robust locks. */ /* Robust locks. */
@@ -157,6 +158,7 @@ __lll_robust_lock (void *ptr, int flags)
} }
} }
} }
libc_hidden_def (__lll_robust_lock)
int int
__lll_robust_abstimed_lock (void *ptr, __lll_robust_abstimed_lock (void *ptr,
@@ -206,6 +208,7 @@ __lll_robust_abstimed_lock (void *ptr,
} }
} }
} }
libc_hidden_def (__lll_robust_abstimed_lock)
int int
__lll_robust_trylock (void *ptr) __lll_robust_trylock (void *ptr)
@@ -225,6 +228,7 @@ __lll_robust_trylock (void *ptr)
return EBUSY; return EBUSY;
} }
libc_hidden_def (__lll_robust_trylock)
void void
__lll_robust_unlock (void *ptr, int flags) __lll_robust_unlock (void *ptr, int flags)
@@ -241,3 +245,5 @@ __lll_robust_unlock (void *ptr, int flags)
break; break;
} }
} }
libc_hidden_def (__lll_robust_unlock)

View File

@@ -68,23 +68,27 @@ extern int __lll_abstimed_xwait (void *__ptr, int __lo, int __hi,
using clock CLK. */ using clock CLK. */
extern int __lll_abstimed_lock (void *__ptr, extern int __lll_abstimed_lock (void *__ptr,
const struct timespec *__tsp, int __flags, int __clk); const struct timespec *__tsp, int __flags, int __clk);
libc_hidden_proto (__lll_abstimed_lock)
/* Acquire the lock at PTR, but return with an error if /* Acquire the lock at PTR, but return with an error if
the process containing the owner thread dies. */ the process containing the owner thread dies. */
extern int __lll_robust_lock (void *__ptr, int __flags); extern int __lll_robust_lock (void *__ptr, int __flags);
#define lll_robust_lock(var, flags) \ #define lll_robust_lock(var, flags) \
__lll_robust_lock (&(var), flags) __lll_robust_lock (&(var), flags)
libc_hidden_proto (__lll_robust_lock)
/* Same as '__lll_robust_lock', but only block until TSP /* Same as '__lll_robust_lock', but only block until TSP
elapses, using clock CLK. */ elapses, using clock CLK. */
extern int __lll_robust_abstimed_lock (void *__ptr, extern int __lll_robust_abstimed_lock (void *__ptr,
const struct timespec *__tsp, int __flags, int __clk); const struct timespec *__tsp, int __flags, int __clk);
libc_hidden_proto (__lll_robust_abstimed_lock)
/* Same as '__lll_robust_lock', but return with an error /* Same as '__lll_robust_lock', but return with an error
if the lock cannot be acquired without blocking. */ if the lock cannot be acquired without blocking. */
extern int __lll_robust_trylock (void *__ptr); extern int __lll_robust_trylock (void *__ptr);
#define lll_robust_trylock(var) \ #define lll_robust_trylock(var) \
__lll_robust_trylock (&(var)) __lll_robust_trylock (&(var))
libc_hidden_proto (__lll_robust_trylock)
/* Wake one or more threads waiting on address PTR, /* Wake one or more threads waiting on address PTR,
setting its value to VAL before doing so. */ setting its value to VAL before doing so. */
@@ -96,6 +100,7 @@ extern int __lll_robust_trylock (void *__ptr);
extern void __lll_robust_unlock (void *__ptr, int __flags); extern void __lll_robust_unlock (void *__ptr, int __flags);
#define lll_robust_unlock(var, flags) \ #define lll_robust_unlock(var, flags) \
__lll_robust_unlock (&(var), flags) __lll_robust_unlock (&(var), flags)
libc_hidden_proto (__lll_robust_unlock)
/* Rearrange threads waiting on address SRC to instead wait on /* Rearrange threads waiting on address SRC to instead wait on
DST, waking one of them if WAIT_ONE is non-zero. */ DST, waking one of them if WAIT_ONE is non-zero. */

View File

@@ -118,9 +118,6 @@ extern int __pthread_atfork (void (*__prepare) (void),
#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread) #if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
# ifdef weak_extern # ifdef weak_extern
weak_extern (__pthread_mutex_destroy) weak_extern (__pthread_mutex_destroy)
weak_extern (__pthread_mutex_lock)
weak_extern (__pthread_mutex_trylock)
weak_extern (__pthread_mutex_unlock)
weak_extern (__pthread_rwlock_init) weak_extern (__pthread_rwlock_init)
weak_extern (__pthread_rwlock_destroy) weak_extern (__pthread_rwlock_destroy)
weak_extern (__pthread_rwlock_rdlock) weak_extern (__pthread_rwlock_rdlock)
@@ -137,9 +134,6 @@ weak_extern (__pthread_atfork)
weak_extern (__pthread_setcancelstate) weak_extern (__pthread_setcancelstate)
# else # else
# pragma weak __pthread_mutex_destroy # pragma weak __pthread_mutex_destroy
# pragma weak __pthread_mutex_lock
# pragma weak __pthread_mutex_trylock
# pragma weak __pthread_mutex_unlock
# pragma weak __pthread_rwlock_destroy # pragma weak __pthread_rwlock_destroy
# pragma weak __pthread_rwlock_rdlock # pragma weak __pthread_rwlock_rdlock
# pragma weak __pthread_rwlock_tryrdlock # pragma weak __pthread_rwlock_tryrdlock

View File

@@ -23,9 +23,6 @@
void __pthread_exit (void *) __attribute__ ((__noreturn__)); void __pthread_exit (void *) __attribute__ ((__noreturn__));
int _pthread_mutex_destroy (pthread_mutex_t *); int _pthread_mutex_destroy (pthread_mutex_t *);
int __pthread_mutex_lock (pthread_mutex_t *);
int __pthread_mutex_trylock (pthread_mutex_t *);
int __pthread_mutex_unlock (pthread_mutex_t *);
int __pthread_setcancelstate (int, int *); int __pthread_setcancelstate (int, int *);
int __pthread_setcanceltype (int, int *); int __pthread_setcanceltype (int, int *);
struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void); struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
@@ -48,9 +45,6 @@ struct pthread_functions
{ {
void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__)); void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__));
int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *); int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
int (*ptr_pthread_mutex_trylock) (pthread_mutex_t *);
int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
int (*ptr___pthread_setcancelstate) (int, int *); int (*ptr___pthread_setcancelstate) (int, int *);
int (*ptr_pthread_setcanceltype) (int, int *); int (*ptr_pthread_setcanceltype) (int, int *);
struct __pthread_cancelation_handler **(*ptr___pthread_get_cleanup_stack) (void); struct __pthread_cancelation_handler **(*ptr___pthread_get_cleanup_stack) (void);

View File

@@ -33,12 +33,19 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__attr); extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__attr);
libc_hidden_proto (__pthread_mutex_init) libc_hidden_proto (__pthread_mutex_init)
extern int __pthread_mutex_clocklock (pthread_mutex_t *__mutex, clockid_t __clockid,
const struct timespec *__abstime);
libc_hidden_proto (__pthread_mutex_clocklock)
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
libc_hidden_proto (__pthread_mutex_lock)
extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex); extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
libc_hidden_proto (__pthread_mutex_trylock)
extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex, extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
const struct timespec *__abstime); const struct timespec *__abstime);
libc_hidden_proto (__pthread_mutex_timedlock)
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
libc_hidden_proto (__pthread_mutex_unlock)
extern int __pthread_mutexattr_getpshared(const pthread_mutexattr_t *__restrict __attr, extern int __pthread_mutexattr_getpshared(const pthread_mutexattr_t *__restrict __attr,
int *__restrict __pshared); int *__restrict __pshared);
libc_hidden_proto (__pthread_mutexattr_getpshared) libc_hidden_proto (__pthread_mutexattr_getpshared)
@@ -164,10 +171,6 @@ hidden_proto (__pthread_key_create)
hidden_proto (__pthread_getspecific) hidden_proto (__pthread_getspecific)
hidden_proto (__pthread_setspecific) hidden_proto (__pthread_setspecific)
hidden_proto (__pthread_mutex_destroy) hidden_proto (__pthread_mutex_destroy)
hidden_proto (__pthread_mutex_lock)
hidden_proto (__pthread_mutex_trylock)
hidden_proto (__pthread_mutex_unlock)
hidden_proto (__pthread_mutex_timedlock)
hidden_proto (__pthread_get_cleanup_stack) hidden_proto (__pthread_get_cleanup_stack)
#endif #endif

View File

@@ -265,7 +265,7 @@ thread_cleanup (void *val)
/* How did the signal thread get killed? */ /* How did the signal thread get killed? */
assert (thread != &__timer_signal_thread_rclk); assert (thread != &__timer_signal_thread_rclk);
pthread_mutex_lock (&__timer_mutex); __pthread_mutex_lock (&__timer_mutex);
thread->exists = 0; thread->exists = 0;
@@ -277,7 +277,7 @@ thread_cleanup (void *val)
else else
(void) __timer_thread_start (thread); (void) __timer_thread_start (thread);
pthread_mutex_unlock (&__timer_mutex); __pthread_mutex_unlock (&__timer_mutex);
/* Unblock potentially blocked timer_delete(). */ /* Unblock potentially blocked timer_delete(). */
__pthread_cond_broadcast (&thread->cond); __pthread_cond_broadcast (&thread->cond);
@@ -291,7 +291,7 @@ thread_expire_timer (struct thread_node *self, struct timer_node *timer)
{ {
self->current_timer = timer; /* Lets timer_delete know timer is running. */ self->current_timer = timer; /* Lets timer_delete know timer is running. */
pthread_mutex_unlock (&__timer_mutex); __pthread_mutex_unlock (&__timer_mutex);
switch (__builtin_expect (timer->event.sigev_notify, SIGEV_SIGNAL)) switch (__builtin_expect (timer->event.sigev_notify, SIGEV_SIGNAL))
{ {
@@ -334,7 +334,7 @@ thread_expire_timer (struct thread_node *self, struct timer_node *timer)
break; break;
} }
pthread_mutex_lock (&__timer_mutex); __pthread_mutex_lock (&__timer_mutex);
self->current_timer = 0; self->current_timer = 0;
@@ -358,7 +358,7 @@ thread_func (void *arg)
pthread_cleanup_push (thread_cleanup, self); pthread_cleanup_push (thread_cleanup, self);
pthread_mutex_lock (&__timer_mutex); __pthread_mutex_lock (&__timer_mutex);
while (1) while (1)
{ {
@@ -550,5 +550,5 @@ __timer_dealloc (struct timer_node *timer)
void void
__timer_mutex_cancel_handler (void *arg) __timer_mutex_cancel_handler (void *arg)
{ {
pthread_mutex_unlock (arg); __pthread_mutex_unlock (arg);
} }

View File

@@ -16,13 +16,14 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <pthread.h> #include <pthreadP.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <pt-internal.h> #include <pt-internal.h>
#include "pt-mutex.h" #include "pt-mutex.h"
#include <hurdlock.h> #include <hurdlock.h>
#include <unistd.h> #include <unistd.h>
#include <shlib-compat.h>
int int
__pthread_mutex_lock (pthread_mutex_t *mtxp) __pthread_mutex_lock (pthread_mutex_t *mtxp)
@@ -76,7 +77,9 @@ __pthread_mutex_lock (pthread_mutex_t *mtxp)
return ret; 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) #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
strong_alias (__pthread_mutex_lock, _pthread_mutex_lock) compat_symbol (libc, __pthread_mutex_lock, pthread_mutex_lock, GLIBC_2_12);
weak_alias (__pthread_mutex_lock, pthread_mutex_lock) #endif

View File

@@ -16,7 +16,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <pthread.h> #include <pthreadP.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <pt-internal.h> #include <pt-internal.h>
@@ -79,6 +79,7 @@ __pthread_mutex_clocklock (pthread_mutex_t *mtxp,
return ret; return ret;
} }
libc_hidden_def (__pthread_mutex_clocklock)
weak_alias (__pthread_mutex_clocklock, pthread_mutex_clocklock) weak_alias (__pthread_mutex_clocklock, pthread_mutex_clocklock)
int int
@@ -87,5 +88,5 @@ __pthread_mutex_timedlock (pthread_mutex_t *mutex,
{ {
return __pthread_mutex_clocklock (mutex, CLOCK_REALTIME, tsp); return __pthread_mutex_clocklock (mutex, CLOCK_REALTIME, tsp);
} }
libc_hidden_def (__pthread_mutex_timedlock)
weak_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock) weak_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
hidden_def (__pthread_mutex_timedlock)

View File

@@ -16,13 +16,14 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <pthread.h> #include <pthreadP.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <pt-internal.h> #include <pt-internal.h>
#include "pt-mutex.h" #include "pt-mutex.h"
#include <hurdlock.h> #include <hurdlock.h>
#include <unistd.h> #include <unistd.h>
#include <shlib-compat.h>
int int
__pthread_mutex_trylock (pthread_mutex_t *mtxp) __pthread_mutex_trylock (pthread_mutex_t *mtxp)
@@ -80,7 +81,9 @@ __pthread_mutex_trylock (pthread_mutex_t *mtxp)
return ret; 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) #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock) compat_symbol (libc, __pthread_mutex_trylock, pthread_mutex_trylock, GLIBC_2_12);
weak_alias (__pthread_mutex_trylock, pthread_mutex_trylock) #endif

View File

@@ -16,13 +16,14 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */ <https://www.gnu.org/licenses/>. */
#include <pthread.h> #include <pthreadP.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <pt-internal.h> #include <pt-internal.h>
#include "pt-mutex.h" #include "pt-mutex.h"
#include <hurdlock.h> #include <hurdlock.h>
#include <unistd.h> #include <unistd.h>
#include <shlib-compat.h>
int int
__pthread_mutex_unlock (pthread_mutex_t *mtxp) __pthread_mutex_unlock (pthread_mutex_t *mtxp)
@@ -87,7 +88,9 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp)
return ret; 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) #if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock) compat_symbol (libc, __pthread_mutex_unlock, pthread_mutex_unlock, GLIBC_2_12);
weak_alias (__pthread_mutex_unlock, pthread_mutex_unlock) #endif

View File

@@ -64,6 +64,10 @@ GLIBC_2.12 pthread_condattr_setpshared F
GLIBC_2.12 pthread_equal F GLIBC_2.12 pthread_equal F
GLIBC_2.12 pthread_getschedparam F GLIBC_2.12 pthread_getschedparam F
GLIBC_2.12 pthread_mutex_init F GLIBC_2.12 pthread_mutex_init F
GLIBC_2.12 pthread_mutex_lock F
GLIBC_2.12 pthread_mutex_timedlock F
GLIBC_2.12 pthread_mutex_trylock F
GLIBC_2.12 pthread_mutex_unlock F
GLIBC_2.12 pthread_mutexattr_destroy F GLIBC_2.12 pthread_mutexattr_destroy F
GLIBC_2.12 pthread_mutexattr_getprioceiling F GLIBC_2.12 pthread_mutexattr_getprioceiling F
GLIBC_2.12 pthread_mutexattr_getprotocol F GLIBC_2.12 pthread_mutexattr_getprotocol F
@@ -2264,6 +2268,7 @@ GLIBC_2.32 __libc_single_threaded D 0x1
GLIBC_2.32 mach_print F GLIBC_2.32 mach_print F
GLIBC_2.32 mremap F GLIBC_2.32 mremap F
GLIBC_2.32 pthread_cond_clockwait F GLIBC_2.32 pthread_cond_clockwait F
GLIBC_2.32 pthread_mutex_clocklock F
GLIBC_2.32 pthread_mutexattr_getrobust F GLIBC_2.32 pthread_mutexattr_getrobust F
GLIBC_2.32 pthread_mutexattr_getrobust_np F GLIBC_2.32 pthread_mutexattr_getrobust_np F
GLIBC_2.32 pthread_mutexattr_setrobust F GLIBC_2.32 pthread_mutexattr_setrobust F
@@ -2549,6 +2554,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F
GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_setrobust_np F
GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_mutexattr_settype F
GLIBC_2.41 pthread_sigmask F GLIBC_2.41 pthread_sigmask F
GLIBC_2.42 pthread_mutex_trylock F
GLIBC_2.5 __readlinkat_chk F GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F GLIBC_2.5 inet6_opt_append F
GLIBC_2.5 inet6_opt_find F GLIBC_2.5 inet6_opt_find F

View File

@@ -43,12 +43,8 @@ GLIBC_2.12 pthread_key_delete F
GLIBC_2.12 pthread_kill F GLIBC_2.12 pthread_kill F
GLIBC_2.12 pthread_mutex_destroy F GLIBC_2.12 pthread_mutex_destroy F
GLIBC_2.12 pthread_mutex_getprioceiling F GLIBC_2.12 pthread_mutex_getprioceiling F
GLIBC_2.12 pthread_mutex_lock F
GLIBC_2.12 pthread_mutex_setprioceiling F GLIBC_2.12 pthread_mutex_setprioceiling F
GLIBC_2.12 pthread_mutex_timedlock F
GLIBC_2.12 pthread_mutex_transfer_np F GLIBC_2.12 pthread_mutex_transfer_np F
GLIBC_2.12 pthread_mutex_trylock F
GLIBC_2.12 pthread_mutex_unlock F
GLIBC_2.12 pthread_once F GLIBC_2.12 pthread_once F
GLIBC_2.12 pthread_rwlock_destroy F GLIBC_2.12 pthread_rwlock_destroy F
GLIBC_2.12 pthread_rwlock_init F GLIBC_2.12 pthread_rwlock_init F
@@ -106,7 +102,6 @@ GLIBC_2.32 mtx_timedlock F
GLIBC_2.32 mtx_trylock F GLIBC_2.32 mtx_trylock F
GLIBC_2.32 mtx_unlock F GLIBC_2.32 mtx_unlock F
GLIBC_2.32 pthread_clockjoin_np F GLIBC_2.32 pthread_clockjoin_np F
GLIBC_2.32 pthread_mutex_clocklock F
GLIBC_2.32 pthread_mutex_consistent F GLIBC_2.32 pthread_mutex_consistent F
GLIBC_2.32 pthread_mutex_consistent_np F GLIBC_2.32 pthread_mutex_consistent_np F
GLIBC_2.32 pthread_rwlock_clockrdlock F GLIBC_2.32 pthread_rwlock_clockrdlock F

View File

@@ -1547,9 +1547,12 @@ GLIBC_2.38 pthread_condattr_setpshared F
GLIBC_2.38 pthread_equal F GLIBC_2.38 pthread_equal F
GLIBC_2.38 pthread_exit F GLIBC_2.38 pthread_exit F
GLIBC_2.38 pthread_getschedparam F GLIBC_2.38 pthread_getschedparam F
GLIBC_2.38 pthread_mutex_clocklock F
GLIBC_2.38 pthread_mutex_destroy F GLIBC_2.38 pthread_mutex_destroy F
GLIBC_2.38 pthread_mutex_init F GLIBC_2.38 pthread_mutex_init F
GLIBC_2.38 pthread_mutex_lock F GLIBC_2.38 pthread_mutex_lock F
GLIBC_2.38 pthread_mutex_timedlock F
GLIBC_2.38 pthread_mutex_trylock F
GLIBC_2.38 pthread_mutex_unlock F GLIBC_2.38 pthread_mutex_unlock F
GLIBC_2.38 pthread_mutexattr_destroy F GLIBC_2.38 pthread_mutexattr_destroy F
GLIBC_2.38 pthread_mutexattr_getprioceiling F GLIBC_2.38 pthread_mutexattr_getprioceiling F
@@ -2237,6 +2240,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust F
GLIBC_2.41 pthread_mutexattr_setrobust_np F GLIBC_2.41 pthread_mutexattr_setrobust_np F
GLIBC_2.41 pthread_mutexattr_settype F GLIBC_2.41 pthread_mutexattr_settype F
GLIBC_2.41 pthread_sigmask F GLIBC_2.41 pthread_sigmask F
GLIBC_2.42 pthread_mutex_trylock F
HURD_CTHREADS_0.3 __cthread_getspecific F HURD_CTHREADS_0.3 __cthread_getspecific F
HURD_CTHREADS_0.3 __cthread_keycreate F HURD_CTHREADS_0.3 __cthread_keycreate F
HURD_CTHREADS_0.3 __cthread_setspecific F HURD_CTHREADS_0.3 __cthread_setspecific F

View File

@@ -61,17 +61,12 @@ GLIBC_2.38 pthread_join F
GLIBC_2.38 pthread_key_create F GLIBC_2.38 pthread_key_create F
GLIBC_2.38 pthread_key_delete F GLIBC_2.38 pthread_key_delete F
GLIBC_2.38 pthread_kill F GLIBC_2.38 pthread_kill F
GLIBC_2.38 pthread_mutex_clocklock F
GLIBC_2.38 pthread_mutex_consistent F GLIBC_2.38 pthread_mutex_consistent F
GLIBC_2.38 pthread_mutex_consistent_np F GLIBC_2.38 pthread_mutex_consistent_np F
GLIBC_2.38 pthread_mutex_destroy F GLIBC_2.38 pthread_mutex_destroy F
GLIBC_2.38 pthread_mutex_getprioceiling F GLIBC_2.38 pthread_mutex_getprioceiling F
GLIBC_2.38 pthread_mutex_lock F
GLIBC_2.38 pthread_mutex_setprioceiling F GLIBC_2.38 pthread_mutex_setprioceiling F
GLIBC_2.38 pthread_mutex_timedlock F
GLIBC_2.38 pthread_mutex_transfer_np F GLIBC_2.38 pthread_mutex_transfer_np F
GLIBC_2.38 pthread_mutex_trylock F
GLIBC_2.38 pthread_mutex_unlock F
GLIBC_2.38 pthread_once F GLIBC_2.38 pthread_once F
GLIBC_2.38 pthread_rwlock_clockrdlock F GLIBC_2.38 pthread_rwlock_clockrdlock F
GLIBC_2.38 pthread_rwlock_clockwrlock F GLIBC_2.38 pthread_rwlock_clockwrlock F