$(addprefix $(LIBC_TOP_HALF_MUSL_SRC_DIR)/, \
thread/__wait.c \
thread/__timedwait.c \
+ thread/pthread_cleanup_push.c \
thread/pthread_mutex_consistent.c \
thread/pthread_mutex_destroy.c \
thread/pthread_mutex_init.c \
thread/pthread_mutexattr_setpshared.c \
thread/pthread_mutexattr_setrobust.c \
thread/pthread_mutexattr_settype.c \
+ thread/pthread_testcancel.c \
+ thread/sem_destroy.c \
+ thread/sem_getvalue.c \
+ thread/sem_init.c \
+ thread/sem_post.c \
+ thread/sem_timedwait.c \
+ thread/sem_trywait.c \
+ thread/sem_wait.c \
thread/pthread_setcancelstate.c \
)
endif
__cxa_atexit
__cxa_finalize
__des_setkey
+__do_cleanup_pop
+__do_cleanup_push
__do_des
__duplocale
__env_rm_add
__pthread_mutex_trylock_owner
__pthread_mutex_unlock
__pthread_setcancelstate
+__pthread_testcancel
__putenv
__qsort_r
__rand48_step
__tan
__tandf
__tanl
+__testcancel
__timedwait
__timedwait_cp
__tm_to_secs
_exit
_flushlbf
_initialize
+_pthread_cleanup_pop
+_pthread_cleanup_push
_start
a64l
abort
pthread_mutexattr_setrobust
pthread_mutexattr_settype
pthread_setcancelstate
+pthread_testcancel
putc
putc_unlocked
putchar
seed48
seekdir
select
+sem_destroy
+sem_getvalue
+sem_init
+sem_post
+sem_timedwait
+sem_trywait
+sem_wait
send
setbuf
setbuffer
#define SEEK_SET __WASI_WHENCE_SET
#define SEGSIZE 512
#define SEM_FAILED ((sem_t *)0)
+#define SEM_NSEMS_MAX 256
+#define SEM_VALUE_MAX 0x7fffffff
#define SERVFAIL ns_r_servfail
#define SHORTBITS (sizeof(short) * 8)
#define SHRT_MAX 0x7fff
#define PTHREAD_STACK_MIN 2048
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
#endif
-#ifdef __wasilibc_unmodified_upstream /* WASI has no semaphores */
+#if defined(__wasilibc_unmodified_upstream) || defined(_REENTRANT)
#define SEM_VALUE_MAX 0x7fffffff
#define SEM_NSEMS_MAX 256
#endif