mirror of git://sourceware.org/git/glibc.git
htl: move pthread_barrier_wait into libc.
Message-ID: <20250209200108.865599-8-gfleury@disroot.org>
This commit is contained in:
parent
2789003489
commit
710bbc9659
|
@ -25,7 +25,6 @@ SYSDEPS := lockfile
|
|||
LCLHDRS :=
|
||||
|
||||
libpthread-routines := \
|
||||
pt-barrier-wait \
|
||||
pt-destroy-specific \
|
||||
pt-init-specific \
|
||||
pt-key-create \
|
||||
|
@ -157,6 +156,7 @@ routines := \
|
|||
pt-barrier \
|
||||
pt-barrier-destroy \
|
||||
pt-barrier-init \
|
||||
pt-barrier-wait \
|
||||
pt-barrierattr-destroy \
|
||||
pt-barrierattr-getpshared \
|
||||
pt-barrierattr-init \
|
||||
|
|
|
@ -28,6 +28,7 @@ libc {
|
|||
pthread_attr_init;
|
||||
pthread_barrier_destroy;
|
||||
pthread_barrier_init;
|
||||
pthread_barrier_wait;
|
||||
pthread_barrierattr_destroy;
|
||||
pthread_barrierattr_getpshared;
|
||||
pthread_barrierattr_init;
|
||||
|
@ -132,6 +133,7 @@ libc {
|
|||
GLIBC_2.42 {
|
||||
pthread_barrier_destroy;
|
||||
pthread_barrier_init;
|
||||
pthread_barrier_wait;
|
||||
pthread_barrierattr_destroy;
|
||||
pthread_barrierattr_getpshared;
|
||||
pthread_barrierattr_init;
|
||||
|
@ -214,8 +216,6 @@ libpthread {
|
|||
|
||||
pthread_atfork;
|
||||
|
||||
pthread_barrier_wait;
|
||||
|
||||
pthread_cancel;
|
||||
|
||||
pthread_create; pthread_detach; pthread_exit;
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <shlib-compat.h>
|
||||
#include <pt-internal.h>
|
||||
|
||||
int
|
||||
pthread_barrier_wait (pthread_barrier_t *barrier)
|
||||
__pthread_barrier_wait (pthread_barrier_t *barrier)
|
||||
{
|
||||
__pthread_spin_wait (&barrier->__lock);
|
||||
if (--barrier->__pending == 0)
|
||||
|
@ -68,3 +68,9 @@ pthread_barrier_wait (pthread_barrier_t *barrier)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
libc_hidden_def (__pthread_barrier_wait)
|
||||
versioned_symbol (libc, __pthread_barrier_wait, pthread_barrier_wait, GLIBC_2_42);
|
||||
|
||||
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_42)
|
||||
compat_symbol (libpthread, __pthread_barrier_wait, pthread_barrier_wait, GLIBC_2_12);
|
||||
#endif
|
||||
|
|
|
@ -37,6 +37,8 @@ extern int __pthread_barrier_init (pthread_barrier_t *__barrier,
|
|||
const pthread_barrierattr_t *__attr,
|
||||
unsigned __count);
|
||||
libc_hidden_proto (__pthread_barrier_init)
|
||||
extern int __pthread_barrier_wait (pthread_barrier_t *__barrier);
|
||||
libc_hidden_proto (__pthread_barrier_wait)
|
||||
extern int __pthread_barrierattr_destroy (pthread_barrierattr_t *__attr);
|
||||
libc_hidden_proto (__pthread_barrierattr_destroy)
|
||||
extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t *__attr,
|
||||
|
|
|
@ -51,6 +51,7 @@ GLIBC_2.12 pthread_attr_setstackaddr F
|
|||
GLIBC_2.12 pthread_attr_setstacksize F
|
||||
GLIBC_2.12 pthread_barrier_destroy F
|
||||
GLIBC_2.12 pthread_barrier_init F
|
||||
GLIBC_2.12 pthread_barrier_wait F
|
||||
GLIBC_2.12 pthread_barrierattr_destroy F
|
||||
GLIBC_2.12 pthread_barrierattr_getpshared F
|
||||
GLIBC_2.12 pthread_barrierattr_init F
|
||||
|
@ -2569,6 +2570,7 @@ GLIBC_2.41 pthread_mutexattr_settype F
|
|||
GLIBC_2.41 pthread_sigmask F
|
||||
GLIBC_2.42 pthread_barrier_destroy F
|
||||
GLIBC_2.42 pthread_barrier_init F
|
||||
GLIBC_2.42 pthread_barrier_wait F
|
||||
GLIBC_2.42 pthread_barrierattr_destroy F
|
||||
GLIBC_2.42 pthread_barrierattr_getpshared F
|
||||
GLIBC_2.42 pthread_barrierattr_init F
|
||||
|
|
|
@ -22,7 +22,6 @@ GLIBC_2.12 flockfile F
|
|||
GLIBC_2.12 ftrylockfile F
|
||||
GLIBC_2.12 funlockfile F
|
||||
GLIBC_2.12 pthread_atfork F
|
||||
GLIBC_2.12 pthread_barrier_wait F
|
||||
GLIBC_2.12 pthread_cancel F
|
||||
GLIBC_2.12 pthread_create F
|
||||
GLIBC_2.12 pthread_detach F
|
||||
|
|
|
@ -1533,6 +1533,7 @@ GLIBC_2.38 pthread_attr_setstackaddr F
|
|||
GLIBC_2.38 pthread_attr_setstacksize F
|
||||
GLIBC_2.38 pthread_barrier_destroy F
|
||||
GLIBC_2.38 pthread_barrier_init F
|
||||
GLIBC_2.38 pthread_barrier_wait F
|
||||
GLIBC_2.38 pthread_barrierattr_destroy F
|
||||
GLIBC_2.38 pthread_barrierattr_getpshared F
|
||||
GLIBC_2.38 pthread_barrierattr_init F
|
||||
|
@ -2252,6 +2253,7 @@ GLIBC_2.41 pthread_mutexattr_settype F
|
|||
GLIBC_2.41 pthread_sigmask F
|
||||
GLIBC_2.42 pthread_barrier_destroy F
|
||||
GLIBC_2.42 pthread_barrier_init F
|
||||
GLIBC_2.42 pthread_barrier_wait F
|
||||
GLIBC_2.42 pthread_barrierattr_destroy F
|
||||
GLIBC_2.42 pthread_barrierattr_getpshared F
|
||||
GLIBC_2.42 pthread_barrierattr_init F
|
||||
|
|
|
@ -39,7 +39,6 @@ GLIBC_2.38 mtx_lock F
|
|||
GLIBC_2.38 mtx_timedlock F
|
||||
GLIBC_2.38 mtx_trylock F
|
||||
GLIBC_2.38 mtx_unlock F
|
||||
GLIBC_2.38 pthread_barrier_wait F
|
||||
GLIBC_2.38 pthread_cancel F
|
||||
GLIBC_2.38 pthread_clockjoin_np F
|
||||
GLIBC_2.38 pthread_create F
|
||||
|
|
Loading…
Reference in New Issue