mirror of git://sourceware.org/git/glibc.git
htl: move pthread_mutex_destroy into libc.
Message-ID: <20250103103750.870897-5-gfleury@disroot.org>
This commit is contained in:
parent
be9f0e7681
commit
8bfabe7a92
|
@ -54,7 +54,6 @@ libpthread-routines := \
|
||||||
pt-setcanceltype \
|
pt-setcanceltype \
|
||||||
pt-testcancel \
|
pt-testcancel \
|
||||||
pt-cancel \
|
pt-cancel \
|
||||||
pt-mutex-destroy \
|
|
||||||
pt-mutex-transfer-np \
|
pt-mutex-transfer-np \
|
||||||
pt-mutex-consistent \
|
pt-mutex-consistent \
|
||||||
pt-rwlock-attr \
|
pt-rwlock-attr \
|
||||||
|
@ -182,6 +181,7 @@ routines := \
|
||||||
pt-condattr-setpshared \
|
pt-condattr-setpshared \
|
||||||
pt-getschedparam \
|
pt-getschedparam \
|
||||||
pt-mutex-checklocked \
|
pt-mutex-checklocked \
|
||||||
|
pt-mutex-destroy \
|
||||||
pt-mutex-getprioceiling \
|
pt-mutex-getprioceiling \
|
||||||
pt-mutex-init \
|
pt-mutex-init \
|
||||||
pt-mutex-lock \
|
pt-mutex-lock \
|
||||||
|
|
|
@ -38,6 +38,7 @@ libc {
|
||||||
pthread_condattr_getpshared;
|
pthread_condattr_getpshared;
|
||||||
pthread_condattr_setclock;
|
pthread_condattr_setclock;
|
||||||
pthread_condattr_setpshared;
|
pthread_condattr_setpshared;
|
||||||
|
pthread_mutex_destroy;
|
||||||
pthread_mutex_getprioceiling;
|
pthread_mutex_getprioceiling;
|
||||||
pthread_mutex_init;
|
pthread_mutex_init;
|
||||||
pthread_mutex_lock;
|
pthread_mutex_lock;
|
||||||
|
@ -151,6 +152,7 @@ libc {
|
||||||
__pthread_condattr_init;
|
__pthread_condattr_init;
|
||||||
__pthread_default_condattr;
|
__pthread_default_condattr;
|
||||||
__pthread_mutex_checklocked;
|
__pthread_mutex_checklocked;
|
||||||
|
__pthread_mutex_destroy;
|
||||||
__pthread_mutex_init;
|
__pthread_mutex_init;
|
||||||
__pthread_mutex_lock;
|
__pthread_mutex_lock;
|
||||||
__pthread_mutex_timedlock;
|
__pthread_mutex_timedlock;
|
||||||
|
@ -214,7 +216,6 @@ libpthread {
|
||||||
pthread_kill;
|
pthread_kill;
|
||||||
__pthread_kill;
|
__pthread_kill;
|
||||||
|
|
||||||
pthread_mutex_destroy;
|
|
||||||
pthread_mutex_transfer_np;
|
pthread_mutex_transfer_np;
|
||||||
|
|
||||||
pthread_once;
|
pthread_once;
|
||||||
|
@ -283,7 +284,6 @@ libpthread {
|
||||||
__pthread_getspecific;
|
__pthread_getspecific;
|
||||||
__pthread_setspecific;
|
__pthread_setspecific;
|
||||||
__pthread_getattr_np;
|
__pthread_getattr_np;
|
||||||
__pthread_mutex_destroy;
|
|
||||||
__pthread_enable_asynccancel;
|
__pthread_enable_asynccancel;
|
||||||
__pthread_disable_asynccancel;
|
__pthread_disable_asynccancel;
|
||||||
_pthread_rwlock_destroy; _pthread_rwlock_init;
|
_pthread_rwlock_destroy; _pthread_rwlock_init;
|
||||||
|
|
|
@ -58,8 +58,6 @@ FORWARD_NORETURN (__pthread_exit, void, (void *retval), (retval),
|
||||||
exit (EXIT_SUCCESS))
|
exit (EXIT_SUCCESS))
|
||||||
strong_alias (__pthread_exit, pthread_exit);
|
strong_alias (__pthread_exit, pthread_exit);
|
||||||
|
|
||||||
FORWARD (pthread_mutex_destroy, (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);
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#if IS_IN (libpthread)
|
#if IS_IN (libpthread)
|
||||||
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_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,
|
||||||
|
|
|
@ -117,7 +117,6 @@ extern int __pthread_atfork (void (*__prepare) (void),
|
||||||
single-threaded processes. */
|
single-threaded processes. */
|
||||||
#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_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)
|
||||||
|
@ -133,7 +132,6 @@ weak_extern (__pthread_initialize)
|
||||||
weak_extern (__pthread_atfork)
|
weak_extern (__pthread_atfork)
|
||||||
weak_extern (__pthread_setcancelstate)
|
weak_extern (__pthread_setcancelstate)
|
||||||
# else
|
# else
|
||||||
# pragma weak __pthread_mutex_destroy
|
|
||||||
# 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
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
void __pthread_exit (void *) __attribute__ ((__noreturn__));
|
void __pthread_exit (void *) __attribute__ ((__noreturn__));
|
||||||
int _pthread_mutex_destroy (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);
|
||||||
|
@ -44,7 +43,6 @@ int _cthreads_ftrylockfile (FILE *);
|
||||||
struct pthread_functions
|
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_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);
|
||||||
|
|
|
@ -36,7 +36,6 @@ libc_hidden_proto (__pthread_mutex_init)
|
||||||
extern int __pthread_mutex_clocklock (pthread_mutex_t *__mutex, clockid_t __clockid,
|
extern int __pthread_mutex_clocklock (pthread_mutex_t *__mutex, clockid_t __clockid,
|
||||||
const struct timespec *__abstime);
|
const struct timespec *__abstime);
|
||||||
libc_hidden_proto (__pthread_mutex_clocklock)
|
libc_hidden_proto (__pthread_mutex_clocklock)
|
||||||
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)
|
libc_hidden_proto (__pthread_mutex_lock)
|
||||||
extern int __pthread_mutex_getprioceiling (const pthread_mutex_t *__mutex,
|
extern int __pthread_mutex_getprioceiling (const pthread_mutex_t *__mutex,
|
||||||
|
@ -176,7 +175,6 @@ hidden_proto (__pthread_detach)
|
||||||
hidden_proto (__pthread_key_create)
|
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_get_cleanup_stack)
|
hidden_proto (__pthread_get_cleanup_stack)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <pt-internal.h>
|
#include <pt-internal.h>
|
||||||
#include "pt-mutex.h"
|
#include "pt-mutex.h"
|
||||||
#include <hurdlock.h>
|
#include <hurdlock.h>
|
||||||
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
__pthread_mutex_destroy (pthread_mutex_t *mtxp)
|
__pthread_mutex_destroy (pthread_mutex_t *mtxp)
|
||||||
|
@ -33,6 +34,9 @@ __pthread_mutex_destroy (pthread_mutex_t *mtxp)
|
||||||
mtxp->__type = -1;
|
mtxp->__type = -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (__pthread_mutex_destroy)
|
||||||
|
versioned_symbol (libc, __pthread_mutex_destroy, pthread_mutex_destroy, GLIBC_2_21);
|
||||||
|
|
||||||
weak_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
|
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
|
||||||
hidden_def (__pthread_mutex_destroy)
|
compat_symbol (libc, __pthread_mutex_destroy, pthread_mutex_destroy, GLIBC_2_12);
|
||||||
|
#endif
|
||||||
|
|
|
@ -63,6 +63,7 @@ GLIBC_2.12 pthread_condattr_setclock F
|
||||||
GLIBC_2.12 pthread_condattr_setpshared F
|
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_destroy F
|
||||||
GLIBC_2.12 pthread_mutex_getprioceiling F
|
GLIBC_2.12 pthread_mutex_getprioceiling 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_lock F
|
||||||
|
|
|
@ -41,7 +41,6 @@ GLIBC_2.12 pthread_join F
|
||||||
GLIBC_2.12 pthread_key_create F
|
GLIBC_2.12 pthread_key_create F
|
||||||
GLIBC_2.12 pthread_key_delete F
|
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_transfer_np F
|
GLIBC_2.12 pthread_mutex_transfer_np 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
|
||||||
|
|
|
@ -63,7 +63,6 @@ GLIBC_2.38 pthread_key_delete F
|
||||||
GLIBC_2.38 pthread_kill F
|
GLIBC_2.38 pthread_kill 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_transfer_np F
|
GLIBC_2.38 pthread_mutex_transfer_np 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
|
||||||
|
|
Loading…
Reference in New Issue