htl: move pthread_cond_signal into libc.

Signed-off-by: gfleury <gfleury@disroot.org>
Message-ID: <20241219203727.669825-6-gfleury@disroot.org>
This commit is contained in:
gfleury 2024-12-19 22:37:24 +02:00 committed by Samuel Thibault
parent 3089d23517
commit f57a277c16
10 changed files with 12 additions and 10 deletions

View file

@ -91,7 +91,6 @@ libpthread-routines := \
pt-rwlock-timedrdlock \
pt-rwlock-timedwrlock \
pt-rwlock-unlock \
pt-cond-signal \
pt-cond-wait \
pt-cond-timedwait \
pt-hurd-cond-wait \
@ -196,6 +195,7 @@ routines := \
pt-cond-brdcast \
pt-cond-destroy \
pt-cond-init \
pt-cond-signal \
pt-condattr-destroy \
pt-condattr-getclock \
pt-condattr-getpshared \

View file

@ -29,6 +29,7 @@ libc {
pthread_cond_broadcast;
pthread_cond_destroy;
pthread_cond_init;
pthread_cond_signal;
pthread_condattr_getclock;
pthread_condattr_init;
pthread_condattr_destroy;
@ -100,6 +101,7 @@ libc {
__pthread_cond_broadcast;
__pthread_cond_destroy;
__pthread_cond_init;
__pthread_cond_signal;
__pthread_condattr_init;
__pthread_default_condattr;
__pthread_sigstate;
@ -140,7 +142,7 @@ libpthread {
pthread_cancel;
pthread_cond_signal; pthread_cond_timedwait; pthread_cond_wait;
pthread_cond_timedwait; pthread_cond_wait;
pthread_create; pthread_detach; pthread_exit;

View file

@ -53,7 +53,6 @@ name decl \
#define FORWARD(name, decl, params, defretval) \
FORWARD2 (name, int, decl, params, return defretval)
FORWARD (pthread_cond_signal, (pthread_cond_t *cond), (cond), 0)
FORWARD (pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex),
(cond, mutex), 0)
FORWARD (pthread_cond_timedwait,

View file

@ -27,7 +27,6 @@
#if IS_IN (libpthread)
static const struct pthread_functions pthread_functions = {
.ptr_pthread_cond_signal = __pthread_cond_signal,
.ptr_pthread_cond_wait = __pthread_cond_wait,
.ptr_pthread_cond_timedwait = __pthread_cond_timedwait,
.ptr___pthread_exit = __pthread_exit,

View file

@ -17,7 +17,7 @@
<https://www.gnu.org/licenses/>. */
#include <pthread.h>
#include <shlib-compat.h>
#include <pt-internal.h>
/* Unblock at least one of the threads that are blocked on condition
@ -38,5 +38,9 @@ __pthread_cond_signal (pthread_cond_t *cond)
return 0;
}
libc_hidden_def (__pthread_cond_signal)
versioned_symbol (libc, __pthread_cond_signal, pthread_cond_signal, GLIBC_2_21);
weak_alias (__pthread_cond_signal, pthread_cond_signal);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
compat_symbol (libc, __pthread_cond_signal, pthread_cond_signal, GLIBC_2_12);
#endif

View file

@ -21,7 +21,6 @@
#include <pthread.h>
int __pthread_cond_signal (pthread_cond_t *);
int __pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *);
int __pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *,
const struct timespec *);
@ -52,7 +51,6 @@ int _cthreads_ftrylockfile (FILE *);
so if possible avoid breaking it and append new hooks to the end. */
struct pthread_functions
{
int (*ptr_pthread_cond_signal) (pthread_cond_t *);
int (*ptr_pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
int (*ptr_pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
const struct timespec *);

View file

@ -45,6 +45,7 @@ extern int __pthread_cond_init (pthread_cond_t *cond,
const pthread_condattr_t *cond_attr);
libc_hidden_proto (__pthread_cond_init)
extern int __pthread_cond_signal (pthread_cond_t *cond);
libc_hidden_proto (__pthread_cond_signal);
extern int __pthread_cond_broadcast (pthread_cond_t *cond);
libc_hidden_proto (__pthread_cond_broadcast);
extern int __pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex);

View file

@ -52,6 +52,7 @@ GLIBC_2.12 pthread_attr_setstacksize F
GLIBC_2.12 pthread_cond_broadcast F
GLIBC_2.12 pthread_cond_destroy F
GLIBC_2.12 pthread_cond_init F
GLIBC_2.12 pthread_cond_signal F
GLIBC_2.12 pthread_condattr_destroy F
GLIBC_2.12 pthread_condattr_getclock F
GLIBC_2.12 pthread_condattr_getpshared F

View file

@ -30,7 +30,6 @@ GLIBC_2.12 pthread_barrierattr_getpshared F
GLIBC_2.12 pthread_barrierattr_init F
GLIBC_2.12 pthread_barrierattr_setpshared F
GLIBC_2.12 pthread_cancel F
GLIBC_2.12 pthread_cond_signal F
GLIBC_2.12 pthread_cond_timedwait F
GLIBC_2.12 pthread_cond_wait F
GLIBC_2.12 pthread_create F

View file

@ -49,7 +49,6 @@ GLIBC_2.38 pthread_barrierattr_setpshared F
GLIBC_2.38 pthread_cancel F
GLIBC_2.38 pthread_clockjoin_np F
GLIBC_2.38 pthread_cond_clockwait F
GLIBC_2.38 pthread_cond_signal F
GLIBC_2.38 pthread_cond_timedwait F
GLIBC_2.38 pthread_cond_wait F
GLIBC_2.38 pthread_create F