# C11 thread symbols.
GLIBC_2.32 {
thrd_current; thrd_equal; thrd_sleep; thrd_yield;
+ thrd_create; thrd_detach; thrd_exit; thrd_join;
+
+ mtx_destroy; mtx_init; mtx_lock; mtx_timedlock; mtx_trylock; mtx_unlock;
+ cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; cnd_timedwait; cnd_wait;
+ tss_create; tss_delete; tss_get; tss_set;
+
+ call_once;
pthread_cond_clockwait;
pthread_clockjoin_np;
}
GLIBC_2.43 {
+ call_once;
+ cnd_broadcast;
+ cnd_destroy;
+ cnd_init;
+ cnd_signal;
+ cnd_timedwait;
+ cnd_wait;
+ mtx_destroy;
+ mtx_init;
+ mtx_lock;
+ mtx_timedlock;
+ mtx_trylock;
+ mtx_unlock;
pthread_cancel;
pthread_clockjoin_np;
pthread_create;
sem_trywait;
sem_unlink;
sem_wait;
+ thrd_create;
+ thrd_detach;
+ thrd_exit;
+ thrd_join;
+ tss_create;
+ tss_delete;
+ tss_get;
+ tss_set;
}
GLIBC_PRIVATE {
}
GLIBC_2.32 {
- # C11 thread symbols.
- thrd_create; thrd_detach; thrd_exit; thrd_join;
- mtx_init; mtx_lock; mtx_timedlock; mtx_trylock; mtx_unlock; mtx_destroy;
- call_once;
- cnd_broadcast; cnd_destroy; cnd_init; cnd_signal; cnd_timedwait; cnd_wait;
- tss_create; tss_delete; tss_get; tss_set;
+ __libpthread_version_placeholder;
}
GLIBC_2.40 {
--- /dev/null
+#define C11_THREADS_INTRODUCED GLIBC_2_32
+#define C11_THREADS_IN_LIBC GLIBC_2_43
GLIBC_2.3.4 xdr_u_quad_t F
GLIBC_2.30 twalk_r F
GLIBC_2.32 __libc_single_threaded D 0x1
+GLIBC_2.32 call_once F
+GLIBC_2.32 cnd_broadcast F
+GLIBC_2.32 cnd_destroy F
+GLIBC_2.32 cnd_init F
+GLIBC_2.32 cnd_signal F
+GLIBC_2.32 cnd_timedwait F
+GLIBC_2.32 cnd_wait F
GLIBC_2.32 mach_print F
GLIBC_2.32 mremap F
+GLIBC_2.32 mtx_destroy F
+GLIBC_2.32 mtx_init F
+GLIBC_2.32 mtx_lock F
+GLIBC_2.32 mtx_timedlock F
+GLIBC_2.32 mtx_trylock F
+GLIBC_2.32 mtx_unlock F
GLIBC_2.32 pthread_clockjoin_np F
GLIBC_2.32 pthread_cond_clockwait F
GLIBC_2.32 pthread_mutex_clocklock F
GLIBC_2.32 sigdescr_np F
GLIBC_2.32 strerrordesc_np F
GLIBC_2.32 strerrorname_np F
+GLIBC_2.32 thrd_create F
GLIBC_2.32 thrd_current F
+GLIBC_2.32 thrd_detach F
GLIBC_2.32 thrd_equal F
+GLIBC_2.32 thrd_exit F
+GLIBC_2.32 thrd_join F
GLIBC_2.32 thrd_sleep F
GLIBC_2.32 thrd_yield F
+GLIBC_2.32 tss_create F
+GLIBC_2.32 tss_delete F
+GLIBC_2.32 tss_get F
+GLIBC_2.32 tss_set F
GLIBC_2.33 __x86_get_cpuid_feature_leaf F
GLIBC_2.33 fstat F
GLIBC_2.33 fstat64 F
GLIBC_2.42 ulabs F
GLIBC_2.42 ullabs F
GLIBC_2.43 __memset_explicit_chk F
+GLIBC_2.43 call_once F
+GLIBC_2.43 cnd_broadcast F
+GLIBC_2.43 cnd_destroy F
+GLIBC_2.43 cnd_init F
+GLIBC_2.43 cnd_signal F
+GLIBC_2.43 cnd_timedwait F
+GLIBC_2.43 cnd_wait F
GLIBC_2.43 free_aligned_sized F
GLIBC_2.43 free_sized F
GLIBC_2.43 memalignment F
GLIBC_2.43 memset_explicit F
+GLIBC_2.43 mtx_destroy F
+GLIBC_2.43 mtx_init F
+GLIBC_2.43 mtx_lock F
+GLIBC_2.43 mtx_timedlock F
+GLIBC_2.43 mtx_trylock F
+GLIBC_2.43 mtx_unlock F
GLIBC_2.43 pthread_cancel F
GLIBC_2.43 pthread_clockjoin_np F
GLIBC_2.43 pthread_create F
GLIBC_2.43 sem_trywait F
GLIBC_2.43 sem_unlink F
GLIBC_2.43 sem_wait F
+GLIBC_2.43 thrd_create F
+GLIBC_2.43 thrd_detach F
+GLIBC_2.43 thrd_exit F
+GLIBC_2.43 thrd_join F
+GLIBC_2.43 tss_create F
+GLIBC_2.43 tss_delete F
+GLIBC_2.43 tss_get F
+GLIBC_2.43 tss_set F
GLIBC_2.43 umaxabs F
GLIBC_2.5 __readlinkat_chk F
GLIBC_2.5 inet6_opt_append F
-GLIBC_2.32 call_once F
-GLIBC_2.32 cnd_broadcast F
-GLIBC_2.32 cnd_destroy F
-GLIBC_2.32 cnd_init F
-GLIBC_2.32 cnd_signal F
-GLIBC_2.32 cnd_timedwait F
-GLIBC_2.32 cnd_wait F
-GLIBC_2.32 mtx_destroy F
-GLIBC_2.32 mtx_init F
-GLIBC_2.32 mtx_lock F
-GLIBC_2.32 mtx_timedlock F
-GLIBC_2.32 mtx_trylock F
-GLIBC_2.32 mtx_unlock F
-GLIBC_2.32 thrd_create F
-GLIBC_2.32 thrd_detach F
-GLIBC_2.32 thrd_exit F
-GLIBC_2.32 thrd_join F
-GLIBC_2.32 tss_create F
-GLIBC_2.32 tss_delete F
-GLIBC_2.32 tss_get F
-GLIBC_2.32 tss_set F
GLIBC_2.38 c16rtomb F
GLIBC_2.38 c32rtomb F
GLIBC_2.38 c8rtomb F
+GLIBC_2.38 call_once F
GLIBC_2.38 calloc F
GLIBC_2.38 canonicalize_file_name F
GLIBC_2.38 catclose F
GLIBC_2.38 closedir F
GLIBC_2.38 closefrom F
GLIBC_2.38 closelog F
+GLIBC_2.38 cnd_broadcast F
+GLIBC_2.38 cnd_destroy F
+GLIBC_2.38 cnd_init F
+GLIBC_2.38 cnd_signal F
+GLIBC_2.38 cnd_timedwait F
+GLIBC_2.38 cnd_wait F
GLIBC_2.38 confstr F
GLIBC_2.38 connect F
GLIBC_2.38 copy_file_range F
GLIBC_2.38 msgsnd F
GLIBC_2.38 msync F
GLIBC_2.38 mtrace F
+GLIBC_2.38 mtx_destroy F
+GLIBC_2.38 mtx_init F
+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 munlock F
GLIBC_2.38 munlockall F
GLIBC_2.38 munmap F
GLIBC_2.38 tempnam F
GLIBC_2.38 textdomain F
GLIBC_2.38 tfind F
+GLIBC_2.38 thrd_create F
GLIBC_2.38 thrd_current F
+GLIBC_2.38 thrd_detach F
GLIBC_2.38 thrd_equal F
+GLIBC_2.38 thrd_exit F
+GLIBC_2.38 thrd_join F
GLIBC_2.38 thrd_sleep F
GLIBC_2.38 thrd_yield F
GLIBC_2.38 thread_depress_abort F
GLIBC_2.38 truncate F
GLIBC_2.38 truncate64 F
GLIBC_2.38 tsearch F
+GLIBC_2.38 tss_create F
+GLIBC_2.38 tss_delete F
+GLIBC_2.38 tss_get F
+GLIBC_2.38 tss_set F
GLIBC_2.38 ttyname F
GLIBC_2.38 ttyname_r F
GLIBC_2.38 ttyslot F
GLIBC_2.42 ulabs F
GLIBC_2.42 ullabs F
GLIBC_2.43 __memset_explicit_chk F
+GLIBC_2.43 call_once F
+GLIBC_2.43 cnd_broadcast F
+GLIBC_2.43 cnd_destroy F
+GLIBC_2.43 cnd_init F
+GLIBC_2.43 cnd_signal F
+GLIBC_2.43 cnd_timedwait F
+GLIBC_2.43 cnd_wait F
GLIBC_2.43 free_aligned_sized F
GLIBC_2.43 free_sized F
GLIBC_2.43 memalignment F
GLIBC_2.43 memset_explicit F
+GLIBC_2.43 mtx_destroy F
+GLIBC_2.43 mtx_init F
+GLIBC_2.43 mtx_lock F
+GLIBC_2.43 mtx_timedlock F
+GLIBC_2.43 mtx_trylock F
+GLIBC_2.43 mtx_unlock F
GLIBC_2.43 pthread_cancel F
GLIBC_2.43 pthread_clockjoin_np F
GLIBC_2.43 pthread_create F
GLIBC_2.43 sem_trywait F
GLIBC_2.43 sem_unlink F
GLIBC_2.43 sem_wait F
+GLIBC_2.43 thrd_create F
+GLIBC_2.43 thrd_detach F
+GLIBC_2.43 thrd_exit F
+GLIBC_2.43 thrd_join F
+GLIBC_2.43 tss_create F
+GLIBC_2.43 tss_delete F
+GLIBC_2.43 tss_get F
+GLIBC_2.43 tss_set F
GLIBC_2.43 umaxabs F
HURD_CTHREADS_0.3 __mutex_init F
HURD_CTHREADS_0.3 __mutex_lock F
-GLIBC_2.38 call_once F
-GLIBC_2.38 cnd_broadcast F
-GLIBC_2.38 cnd_destroy F
-GLIBC_2.38 cnd_init F
-GLIBC_2.38 cnd_signal F
-GLIBC_2.38 cnd_timedwait F
-GLIBC_2.38 cnd_wait F
-GLIBC_2.38 mtx_destroy F
-GLIBC_2.38 mtx_init F
-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 thrd_create F
-GLIBC_2.38 thrd_detach F
-GLIBC_2.38 thrd_exit F
-GLIBC_2.38 thrd_join F
-GLIBC_2.38 tss_create F
-GLIBC_2.38 tss_delete F
-GLIBC_2.38 tss_get F
-GLIBC_2.38 tss_set F
--- /dev/null
+#define C11_THREADS_INTRODUCED GLIBC_2_28
+#define C11_THREADS_IN_LIBC GLIBC_2_34
# headers
routines += \
- pthread_atfork \
- pthread_atfork_compat \
- thrd_current \
- thrd_equal \
- thrd_sleep \
- thrd_yield \
- # routines
-
-$(libpthread-routines-var) += \
call_once \
cnd_broadcast \
cnd_destroy \
mtx_timedlock \
mtx_trylock \
mtx_unlock \
+ pthread_atfork \
+ pthread_atfork_compat \
thrd_create \
+ thrd_current \
thrd_detach \
+ thrd_equal \
thrd_exit \
thrd_join \
+ thrd_sleep \
+ thrd_yield \
tss_create \
tss_delete \
tss_get \
tss_set \
- # $(libpthread-routines-var)
+ # routines
tests += \
tst-abstime \
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
void
__call_once (once_flag *flag, void (*func)(void))
"alignof (once_flag) != alignof (pthread_once_t)");
__pthread_once ((pthread_once_t *) flag, func);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __call_once, call_once, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __call_once, call_once, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__call_once, call_once)
+versioned_symbol (libc, __call_once, call_once, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __call_once, call_once, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__cnd_broadcast (cnd_t *cond)
int err_code = __pthread_cond_broadcast ((pthread_cond_t*) cond);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __cnd_broadcast, cnd_broadcast, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __cnd_broadcast, cnd_broadcast, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__cnd_broadcast, cnd_broadcast)
+versioned_symbol (libc, __cnd_broadcast, cnd_broadcast, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __cnd_broadcast, cnd_broadcast, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include "pthreadP.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
void
__cnd_destroy (cnd_t *cond)
{
__pthread_cond_destroy ((pthread_cond_t *) cond);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __cnd_destroy, cnd_destroy, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __cnd_destroy, cnd_destroy, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__cnd_destroy, cnd_destroy)
+versioned_symbol (libc, __cnd_destroy, cnd_destroy, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __cnd_destroy, cnd_destroy, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
__cnd_init (cnd_t *cond)
int err_code = __pthread_cond_init ((pthread_cond_t *)cond, NULL);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __cnd_init, cnd_init, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __cnd_init, cnd_init, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__cnd_init, cnd_init)
+versioned_symbol (libc, __cnd_init, cnd_init, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __cnd_init, cnd_init, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__cnd_signal (cnd_t *cond)
int err_code = __pthread_cond_signal ((pthread_cond_t *) cond);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __cnd_signal, cnd_signal, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __cnd_signal, cnd_signal, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__cnd_signal, cnd_signal)
+
+versioned_symbol (libc, __cnd_signal, cnd_signal, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __cnd_signal, cnd_signal, C11_THREADS_INTRODUCED);
#endif
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
-cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
+__cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
const struct timespec* restrict time_point)
{
int err_code = __pthread_cond_timedwait ((pthread_cond_t *) cond,
time_point);
return thrd_err_map (err_code);
}
+versioned_symbol (libc, __cnd_timedwait, cnd_timedwait, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __cnd_timedwait, cnd_timedwait, C11_THREADS_INTRODUCED);
+#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__cnd_wait (cnd_t *cond, mtx_t *mutex)
(pthread_mutex_t *) mutex);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __cnd_wait, cnd_wait, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __cnd_wait, cnd_wait, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__cnd_wait, cnd_wait)
+versioned_symbol (libc, __cnd_wait, cnd_wait, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __cnd_wait, cnd_wait, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include "pthreadP.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
void
__mtx_destroy (mtx_t *mutex)
{
__pthread_mutex_destroy ((pthread_mutex_t *) mutex);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __mtx_destroy, mtx_destroy, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __mtx_destroy, mtx_destroy, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__mtx_destroy, mtx_destroy)
+versioned_symbol (libc, __mtx_destroy, mtx_destroy, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __mtx_destroy, mtx_destroy, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
__mtx_init (mtx_t *mutex, int type)
/* pthread_mutexattr_destroy implementation is a noop. */
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __mtx_init, mtx_init, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __mtx_init, mtx_init, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__mtx_init, mtx_init)
+versioned_symbol (libc, __mtx_init, mtx_init, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __mtx_init, mtx_init, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__mtx_lock (mtx_t *mutex)
int err_code = __pthread_mutex_lock ((pthread_mutex_t *) mutex);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __mtx_lock, mtx_lock, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __mtx_lock, mtx_lock, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__mtx_lock, mtx_lock)
+versioned_symbol (libc, __mtx_lock, mtx_lock, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __mtx_lock, mtx_lock, C11_THREADS_INTRODUCED);
#endif
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
-mtx_timedlock (mtx_t *restrict mutex,
+__mtx_timedlock (mtx_t *restrict mutex,
const struct timespec *restrict time_point)
{
int err_code = __pthread_mutex_timedlock ((pthread_mutex_t *)mutex,
time_point);
return thrd_err_map (err_code);
}
+versioned_symbol (libc, __mtx_timedlock, mtx_timedlock, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __mtx_timedlock, mtx_timedlock, C11_THREADS_INTRODUCED);
+#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
__mtx_trylock (mtx_t *mutex)
int err_code = __pthread_mutex_trylock ((pthread_mutex_t *) mutex);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __mtx_trylock, mtx_trylock, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __mtx_trylock, mtx_trylock, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__mtx_trylock, mtx_trylock)
+versioned_symbol (libc, __mtx_trylock, mtx_trylock, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __mtx_trylock, mtx_trylock, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__mtx_unlock (mtx_t *mutex)
int err_code = __pthread_mutex_unlock ((pthread_mutex_t *) mutex);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __mtx_unlock, mtx_unlock, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __mtx_unlock, mtx_unlock, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__mtx_unlock, mtx_unlock)
+versioned_symbol (libc, __mtx_unlock, mtx_unlock, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __mtx_unlock, mtx_unlock, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
(void* (*) (void*))func, arg);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __thrd_create, thrd_create, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libc, __thrd_create, thrd_create, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__thrd_create, thrd_create)
+versioned_symbol (libc, __thrd_create, thrd_create, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __thrd_create, thrd_create, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__thrd_detach (thrd_t thr)
err_code = __pthread_detach (thr);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __thrd_detach, thrd_detach, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libc, __thrd_detach, thrd_detach, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__thrd_detach, thrd_detach)
+versioned_symbol (libc, __thrd_detach, thrd_detach, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __thrd_detach, thrd_detach, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
_Noreturn void
__thrd_exit (int res)
{
__pthread_exit ((void*)(uintptr_t) res);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __thrd_exit, thrd_exit, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __thrd_exit, thrd_exit, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__thrd_exit, thrd_exit)
+versioned_symbol (libc, __thrd_exit, thrd_exit, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __thrd_exit, thrd_exit, C11_THREADS_INTRODUCED);
#endif
#include "thrd_priv.h"
#include <shlib-compat.h>
+#include <c11-thread.h>
int
__thrd_join (thrd_t thr, int *res)
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __thrd_join, thrd_join, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libc, __thrd_join, thrd_join, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__thrd_join, thrd_join)
+versioned_symbol (libc, __thrd_join, thrd_join, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __thrd_join, thrd_join, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
__tss_create (tss_t *tss_id, tss_dtor_t destructor)
int err_code = __pthread_key_create (tss_id, destructor);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __tss_create, tss_create, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __tss_create, tss_create, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__tss_create, tss_create)
+versioned_symbol (libc, __tss_create, tss_create, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __tss_create, tss_create, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
void
__tss_delete (tss_t tss_id)
{
__pthread_key_delete (tss_id);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __tss_delete, tss_delete, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __tss_delete, tss_delete, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__tss_delete, tss_delete)
+versioned_symbol (libc, __tss_delete, tss_delete, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __tss_delete, tss_delete, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
void *
__tss_get (tss_t tss_id)
{
return __pthread_getspecific (tss_id);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __tss_get, tss_get, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __tss_get, tss_get, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__tss_get, tss_get)
+versioned_symbol (libc, __tss_get, tss_get, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __tss_get, tss_get, C11_THREADS_INTRODUCED);
#endif
#include <shlib-compat.h>
#include "thrd_priv.h"
+#include <c11-thread.h>
int
__tss_set (tss_t tss_id, void *val)
int err_code = __pthread_setspecific (tss_id, val);
return thrd_err_map (err_code);
}
-#if PTHREAD_IN_LIBC
-versioned_symbol (libc, __tss_set, tss_set, GLIBC_2_34);
-# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
-compat_symbol (libpthread, __tss_set, tss_set, GLIBC_2_28);
-# endif
-#else /* !PTHREAD_IN_LIBC */
-strong_alias (__tss_set, tss_set)
+versioned_symbol (libc, __tss_set, tss_set, C11_THREADS_IN_LIBC);
+#if OTHER_SHLIB_COMPAT (libpthread, C11_THREADS_INTRODUCED, C11_THREADS_IN_LIBC)
+compat_symbol (libpthread, __tss_set, tss_set, C11_THREADS_INTRODUCED);
#endif