mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
htl: move pthread_mutex_init into libc.
Message-ID: <20250103103750.870897-2-gfleury@disroot.org>
This commit is contained in:
@@ -54,7 +54,6 @@ libpthread-routines := \
|
|||||||
pt-setcanceltype \
|
pt-setcanceltype \
|
||||||
pt-testcancel \
|
pt-testcancel \
|
||||||
pt-cancel \
|
pt-cancel \
|
||||||
pt-mutex-init \
|
|
||||||
pt-mutex-destroy \
|
pt-mutex-destroy \
|
||||||
pt-mutex-lock \
|
pt-mutex-lock \
|
||||||
pt-mutex-trylock \
|
pt-mutex-trylock \
|
||||||
@@ -189,6 +188,7 @@ routines := \
|
|||||||
pt-condattr-setpshared \
|
pt-condattr-setpshared \
|
||||||
pt-getschedparam \
|
pt-getschedparam \
|
||||||
pt-mutex-checklocked \
|
pt-mutex-checklocked \
|
||||||
|
pt-mutex-init \
|
||||||
pt-mutexattr-destroy \
|
pt-mutexattr-destroy \
|
||||||
pt-mutexattr-getprioceiling \
|
pt-mutexattr-getprioceiling \
|
||||||
pt-mutexattr-getprotocol \
|
pt-mutexattr-getprotocol \
|
||||||
|
@@ -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_init;
|
||||||
pthread_mutexattr_destroy;
|
pthread_mutexattr_destroy;
|
||||||
pthread_mutexattr_getprioceiling;
|
pthread_mutexattr_getprioceiling;
|
||||||
pthread_mutexattr_getprotocol;
|
pthread_mutexattr_getprotocol;
|
||||||
@@ -137,6 +138,7 @@ libc {
|
|||||||
__pthread_condattr_init;
|
__pthread_condattr_init;
|
||||||
__pthread_default_condattr;
|
__pthread_default_condattr;
|
||||||
__pthread_mutex_checklocked;
|
__pthread_mutex_checklocked;
|
||||||
|
__pthread_mutex_init;
|
||||||
__pthread_mutexattr_destroy;
|
__pthread_mutexattr_destroy;
|
||||||
__pthread_mutexattr_init;
|
__pthread_mutexattr_init;
|
||||||
__pthread_mutexattr_settype;
|
__pthread_mutexattr_settype;
|
||||||
@@ -196,7 +198,7 @@ libpthread {
|
|||||||
__pthread_kill;
|
__pthread_kill;
|
||||||
|
|
||||||
pthread_mutex_destroy; pthread_mutex_getprioceiling;
|
pthread_mutex_destroy; pthread_mutex_getprioceiling;
|
||||||
pthread_mutex_init; pthread_mutex_lock; pthread_mutex_setprioceiling;
|
pthread_mutex_lock; pthread_mutex_setprioceiling;
|
||||||
pthread_mutex_timedlock; pthread_mutex_transfer_np;
|
pthread_mutex_timedlock; pthread_mutex_transfer_np;
|
||||||
pthread_mutex_trylock; pthread_mutex_unlock;
|
pthread_mutex_trylock; pthread_mutex_unlock;
|
||||||
|
|
||||||
@@ -267,7 +269,6 @@ libpthread {
|
|||||||
__pthread_getspecific;
|
__pthread_getspecific;
|
||||||
__pthread_setspecific;
|
__pthread_setspecific;
|
||||||
__pthread_getattr_np;
|
__pthread_getattr_np;
|
||||||
__pthread_mutex_init;
|
|
||||||
__pthread_mutex_destroy;
|
__pthread_mutex_destroy;
|
||||||
__pthread_mutex_timedlock;
|
__pthread_mutex_timedlock;
|
||||||
__pthread_enable_asynccancel;
|
__pthread_enable_asynccancel;
|
||||||
|
@@ -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_init,
|
|
||||||
(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr),
|
|
||||||
(mutex, mutexattr), 0)
|
|
||||||
|
|
||||||
FORWARD (pthread_mutex_lock, (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_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
|
||||||
|
@@ -29,7 +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_init = __pthread_mutex_init,
|
|
||||||
.ptr_pthread_mutex_lock = __pthread_mutex_lock,
|
.ptr_pthread_mutex_lock = __pthread_mutex_lock,
|
||||||
.ptr_pthread_mutex_trylock = __pthread_mutex_trylock,
|
.ptr_pthread_mutex_trylock = __pthread_mutex_trylock,
|
||||||
.ptr_pthread_mutex_unlock = __pthread_mutex_unlock,
|
.ptr_pthread_mutex_unlock = __pthread_mutex_unlock,
|
||||||
|
@@ -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_init)
|
|
||||||
weak_extern (__pthread_mutex_destroy)
|
weak_extern (__pthread_mutex_destroy)
|
||||||
weak_extern (__pthread_mutex_lock)
|
weak_extern (__pthread_mutex_lock)
|
||||||
weak_extern (__pthread_mutex_trylock)
|
weak_extern (__pthread_mutex_trylock)
|
||||||
@@ -137,7 +136,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_init
|
|
||||||
# pragma weak __pthread_mutex_destroy
|
# pragma weak __pthread_mutex_destroy
|
||||||
# pragma weak __pthread_mutex_lock
|
# pragma weak __pthread_mutex_lock
|
||||||
# pragma weak __pthread_mutex_trylock
|
# pragma weak __pthread_mutex_trylock
|
||||||
|
@@ -23,8 +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_init (pthread_mutex_t *,
|
|
||||||
const pthread_mutexattr_t *);
|
|
||||||
int __pthread_mutex_lock (pthread_mutex_t *);
|
int __pthread_mutex_lock (pthread_mutex_t *);
|
||||||
int __pthread_mutex_trylock (pthread_mutex_t *);
|
int __pthread_mutex_trylock (pthread_mutex_t *);
|
||||||
int __pthread_mutex_unlock (pthread_mutex_t *);
|
int __pthread_mutex_unlock (pthread_mutex_t *);
|
||||||
@@ -50,8 +48,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_init) (pthread_mutex_t *,
|
|
||||||
const pthread_mutexattr_t *);
|
|
||||||
int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
|
int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
|
||||||
int (*ptr_pthread_mutex_trylock) (pthread_mutex_t *);
|
int (*ptr_pthread_mutex_trylock) (pthread_mutex_t *);
|
||||||
int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
|
int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
|
||||||
|
@@ -32,6 +32,7 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
|
|||||||
/* These represent the interface used by glibc itself. */
|
/* These represent the interface used by glibc itself. */
|
||||||
|
|
||||||
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)
|
||||||
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);
|
||||||
extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
|
extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
|
||||||
@@ -162,7 +163,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_init)
|
|
||||||
hidden_proto (__pthread_mutex_destroy)
|
hidden_proto (__pthread_mutex_destroy)
|
||||||
hidden_proto (__pthread_mutex_lock)
|
hidden_proto (__pthread_mutex_lock)
|
||||||
hidden_proto (__pthread_mutex_trylock)
|
hidden_proto (__pthread_mutex_trylock)
|
||||||
|
@@ -191,7 +191,7 @@ static void
|
|||||||
reinit_after_fork (void)
|
reinit_after_fork (void)
|
||||||
{
|
{
|
||||||
init_module ();
|
init_module ();
|
||||||
pthread_mutex_init (&__timer_mutex, 0);
|
__pthread_mutex_init (&__timer_mutex, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <pthreadP.h>
|
#include <pthreadP.h>
|
||||||
#include "pt-mutex.h"
|
#include "pt-mutex.h"
|
||||||
#include <hurdlock.h>
|
#include <hurdlock.h>
|
||||||
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
static const pthread_mutexattr_t dfl_attr = {
|
static const pthread_mutexattr_t dfl_attr = {
|
||||||
.__prioceiling = 0,
|
.__prioceiling = 0,
|
||||||
@@ -54,6 +55,9 @@ __pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
libc_hidden_def (__pthread_mutex_init)
|
||||||
|
versioned_symbol (libc, __pthread_mutex_init, pthread_mutex_init, GLIBC_2_21);
|
||||||
|
|
||||||
weak_alias (__pthread_mutex_init, pthread_mutex_init)
|
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
|
||||||
hidden_def (__pthread_mutex_init)
|
compat_symbol (libc, __pthread_mutex_init, pthread_mutex_init, 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_init 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
|
||||||
|
@@ -43,7 +43,6 @@ 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_init F
|
|
||||||
GLIBC_2.12 pthread_mutex_lock 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_timedlock F
|
||||||
|
@@ -66,7 +66,6 @@ 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_init F
|
|
||||||
GLIBC_2.38 pthread_mutex_lock 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_timedlock F
|
||||||
|
Reference in New Issue
Block a user