Blame src/api/pthread.c

nsz d7c151
#include <pthread.h>
nsz d7c151
#define T(t) (t*)0;
nsz d7c151
#define C(n) switch(n){case n:;}
nsz d7c151
static void f()
nsz d7c151
{
nsz d7c151
T(pthread_attr_t)
nsz d7c151
T(pthread_barrier_t)
nsz d7c151
T(pthread_barrierattr_t)
nsz d7c151
T(pthread_cond_t)
nsz d7c151
T(pthread_condattr_t)
nsz d7c151
T(pthread_key_t)
nsz d7c151
T(pthread_mutex_t)
nsz d7c151
T(pthread_mutexattr_t)
nsz d7c151
T(pthread_once_t)
nsz d7c151
T(pthread_rwlock_t)
nsz d7c151
T(pthread_rwlockattr_t)
nsz d7c151
T(pthread_spinlock_t)
nsz d7c151
T(pthread_t)
nsz d7c151
C(PTHREAD_BARRIER_SERIAL_THREAD)
nsz d7c151
C(PTHREAD_CANCEL_ASYNCHRONOUS)
nsz d7c151
C(PTHREAD_CANCEL_ENABLE)
nsz d7c151
C(PTHREAD_CANCEL_DEFERRED)
nsz d7c151
C(PTHREAD_CANCEL_DISABLE)
nsz d7c151
{void *x = PTHREAD_CANCELED;}
nsz d7c151
C(PTHREAD_CREATE_DETACHED)
nsz d7c151
C(PTHREAD_CREATE_JOINABLE)
nsz d7c151
C(PTHREAD_MUTEX_DEFAULT)
nsz d7c151
C(PTHREAD_MUTEX_ERRORCHECK)
nsz d7c151
C(PTHREAD_MUTEX_NORMAL)
nsz d7c151
C(PTHREAD_MUTEX_RECURSIVE)
nsz d7c151
C(PTHREAD_MUTEX_ROBUST)
nsz d7c151
C(PTHREAD_MUTEX_STALLED)
nsz d7c151
C(PTHREAD_ONCE_INIT)
nsz d7c151
C(PTHREAD_PRIO_INHERIT)
nsz d7c151
C(PTHREAD_PRIO_NONE)
nsz 3c60f4
#ifdef X_RPP_TPP
nsz d7c151
C(PTHREAD_PRIO_PROTECT)
nsz 3c60f4
#endif
nsz d7c151
C(PTHREAD_PROCESS_SHARED)
nsz d7c151
C(PTHREAD_PROCESS_PRIVATE)
nsz 3c60f4
#ifdef X_TPS
nsz 3c60f4
C(PTHREAD_EXPLICIT_SCHED)
nsz 3c60f4
C(PTHREAD_INHERIT_SCHED)
nsz d7c151
C(PTHREAD_SCOPE_PROCESS)
nsz d7c151
C(PTHREAD_SCOPE_SYSTEM)
nsz 3c60f4
#endif
nsz d7c151
{pthread_cond_t x = PTHREAD_COND_INITIALIZER;}
nsz d7c151
{pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;}
nsz d7c151
{pthread_rwlock_t x = PTHREAD_RWLOCK_INITIALIZER;}
nsz 0ef264
{int(*p)(void(*)(void),void(*)(void),void(*)(void)) = pthread_atfork;}
nsz 0ef264
{int(*p)(pthread_attr_t*) = pthread_attr_destroy;}
nsz 0ef264
{int(*p)(const pthread_attr_t*,int*) = pthread_attr_getdetachstate;}
nsz 0ef264
{int(*p)(const pthread_attr_t*restrict,size_t*restrict) = pthread_attr_getguardsize;}
nsz 0ef264
{int(*p)(const pthread_attr_t*restrict,struct sched_param*restrict) = pthread_attr_getschedparam;}
nsz 0ef264
{int(*p)(const pthread_attr_t*restrict,void**restrict,size_t*restrict) = pthread_attr_getstack;}
nsz 0ef264
{int(*p)(const pthread_attr_t*restrict,size_t*restrict) = pthread_attr_getstacksize;}
nsz 0ef264
{int(*p)(pthread_attr_t*) = pthread_attr_init;}
nsz 0ef264
{int(*p)(pthread_attr_t*,int) = pthread_attr_setdetachstate;}
nsz 0ef264
{int(*p)(pthread_attr_t*,size_t) = pthread_attr_setguardsize;}
nsz 0ef264
{int(*p)(pthread_attr_t*restrict,const struct sched_param*restrict) = pthread_attr_setschedparam;}
nsz 0ef264
{int(*p)(pthread_attr_t*,void*,size_t) = pthread_attr_setstack;}
nsz 0ef264
{int(*p)(pthread_attr_t*,size_t) = pthread_attr_setstacksize;}
nsz 0ef264
{int(*p)(pthread_barrier_t*) = pthread_barrier_destroy;}
nsz 0ef264
{int(*p)(pthread_barrier_t*restrict,const pthread_barrierattr_t*restrict,unsigned) = pthread_barrier_init;}
nsz 0ef264
{int(*p)(pthread_barrier_t*) = pthread_barrier_wait;}
nsz 0ef264
{int(*p)(pthread_barrierattr_t*) = pthread_barrierattr_destroy;}
nsz 0ef264
{int(*p)(const pthread_barrierattr_t*restrict,int*restrict) = pthread_barrierattr_getpshared;}
nsz 0ef264
{int(*p)(pthread_barrierattr_t*) = pthread_barrierattr_init;}
nsz 0ef264
{int(*p)(pthread_barrierattr_t*,int) = pthread_barrierattr_setpshared;}
nsz 0ef264
{int(*p)(pthread_t) = pthread_cancel;}
nsz 0ef264
{void(*p)(int) = pthread_cleanup_pop;}
nsz 0ef264
{void(*p)(void(*)(void*),void*) = pthread_cleanup_push;}
nsz 0ef264
{int(*p)(pthread_cond_t*) = pthread_cond_broadcast;}
nsz 0ef264
{int(*p)(pthread_cond_t*) = pthread_cond_destroy;}
nsz 0ef264
{int(*p)(pthread_cond_t*restrict,const pthread_condattr_t*restrict) = pthread_cond_init;}
nsz 0ef264
{int(*p)(pthread_cond_t*) = pthread_cond_signal;}
nsz 0ef264
{int(*p)(pthread_cond_t*restrict,pthread_mutex_t*restrict,const struct timespec*restrict) = pthread_cond_timedwait;}
nsz 0ef264
{int(*p)(pthread_cond_t*restrict,pthread_mutex_t*restrict) = pthread_cond_wait;}
nsz 0ef264
{int(*p)(pthread_condattr_t*) = pthread_condattr_destroy;}
nsz 0ef264
{int(*p)(const pthread_condattr_t*restrict,clockid_t*restrict) = pthread_condattr_getclock;}
nsz 0ef264
{int(*p)(const pthread_condattr_t*restrict,int*restrict) = pthread_condattr_getpshared;}
nsz 0ef264
{int(*p)(pthread_condattr_t*) = pthread_condattr_init;}
nsz 0ef264
{int(*p)(pthread_condattr_t*,clockid_t) = pthread_condattr_setclock;}
nsz 0ef264
{int(*p)(pthread_condattr_t*,int) = pthread_condattr_setpshared;}
nsz 0ef264
{int(*p)(pthread_t*restrict,const pthread_attr_t*restrict,void*(*)(void*),void*restrict) = pthread_create;}
nsz 0ef264
{int(*p)(pthread_t) = pthread_detach;}
nsz 0ef264
{int(*p)(pthread_t,pthread_t) = pthread_equal;}
nsz 0ef264
{void(*p)(void*) = pthread_exit;}
nsz 0ef264
{void*(*p)(pthread_key_t) = pthread_getspecific;}
nsz 0ef264
{int(*p)(pthread_t,void**) = pthread_join;}
nsz 0ef264
{int(*p)(pthread_key_t*,void(*)(void*)) = pthread_key_create;}
nsz 0ef264
{int(*p)(pthread_key_t) = pthread_key_delete;}
nsz 0ef264
{int(*p)(pthread_mutex_t*) = pthread_mutex_consistent;}
nsz 0ef264
{int(*p)(pthread_mutex_t*) = pthread_mutex_destroy;}
nsz 0ef264
{int(*p)(pthread_mutex_t*restrict,const pthread_mutexattr_t*restrict) = pthread_mutex_init;}
nsz 0ef264
{int(*p)(pthread_mutex_t*) = pthread_mutex_lock;}
nsz 0ef264
{int(*p)(pthread_mutex_t*) = pthread_mutex_trylock;}
nsz 0ef264
{int(*p)(pthread_mutex_t*) = pthread_mutex_unlock;}
nsz 0ef264
{int(*p)(pthread_mutexattr_t*) = pthread_mutexattr_destroy;}
nsz 0ef264
{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getprotocol;}
nsz 0ef264
{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getpshared;}
nsz 0ef264
{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getrobust;}
nsz 0ef264
{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_gettype;}
nsz 0ef264
{int(*p)(pthread_mutexattr_t*) = pthread_mutexattr_init;}
nsz 0ef264
{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setprotocol;}
nsz 0ef264
{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setpshared;}
nsz 0ef264
{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setrobust;}
nsz 0ef264
{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_settype;}
nsz 0ef264
{int(*p)(pthread_once_t*,void(*)(void)) = pthread_once;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*) = pthread_rwlock_destroy;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*restrict,const pthread_rwlockattr_t*restrict) = pthread_rwlock_init;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*) = pthread_rwlock_rdlock;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*) = pthread_rwlock_tryrdlock;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*) = pthread_rwlock_trywrlock;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*) = pthread_rwlock_unlock;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*) = pthread_rwlock_wrlock;}
nsz 0ef264
{int(*p)(pthread_rwlockattr_t*) = pthread_rwlockattr_destroy;}
nsz 0ef264
{int(*p)(const pthread_rwlockattr_t*restrict,int*restrict) = pthread_rwlockattr_getpshared;}
nsz 0ef264
{int(*p)(pthread_rwlockattr_t*) = pthread_rwlockattr_init;}
nsz 0ef264
{int(*p)(pthread_rwlockattr_t*,int) = pthread_rwlockattr_setpshared;}
nsz 0ef264
{pthread_t(*p)(void) = pthread_self;}
nsz 0ef264
{int(*p)(int,int*) = pthread_setcancelstate;}
nsz 0ef264
{int(*p)(int,int*) = pthread_setcanceltype;}
nsz 0ef264
{int(*p)(pthread_t,int) = pthread_setschedprio;}
nsz 0ef264
{int(*p)(pthread_key_t,const void*) = pthread_setspecific;}
nsz 0ef264
{int(*p)(pthread_spinlock_t*) = pthread_spin_destroy;}
nsz 0ef264
{int(*p)(pthread_spinlock_t*,int) = pthread_spin_init;}
nsz 0ef264
{int(*p)(pthread_spinlock_t*) = pthread_spin_lock;}
nsz 0ef264
{int(*p)(pthread_spinlock_t*) = pthread_spin_trylock;}
nsz 0ef264
{int(*p)(pthread_spinlock_t*) = pthread_spin_unlock;}
nsz 0ef264
{void(*p)(void) = pthread_testcancel;}
nsz 3c60f4
nsz 3c60f4
#ifdef X_RPP_TPP
nsz 3c60f4
{int(*p)(const pthread_mutex_t*restrict,int*restrict) = pthread_mutex_getprioceiling;}
nsz 3c60f4
{int(*p)(pthread_mutex_t*restrict,int,int*restrict) = pthread_mutex_setprioceiling;}
nsz 3c60f4
{int(*p)(const pthread_mutexattr_t*restrict,int*restrict) = pthread_mutexattr_getprioceiling;}
nsz 3c60f4
{int(*p)(pthread_mutexattr_t*,int) = pthread_mutexattr_setprioceiling;}
nsz 3c60f4
#endif
nsz 3c60f4
nsz 3c60f4
#ifdef X_TPS
nsz 3c60f4
{int(*p)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getinheritsched;}
nsz 3c60f4
{int(*p)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getschedpolicy;}
nsz 3c60f4
{int(*p)(const pthread_attr_t*restrict,int*restrict) = pthread_attr_getscope;}
nsz 3c60f4
{int(*p)(pthread_attr_t*,int) = pthread_attr_setinheritsched;}
nsz 3c60f4
{int(*p)(pthread_attr_t*,int) = pthread_attr_setschedpolicy;}
nsz 3c60f4
{int(*p)(pthread_attr_t*,int) = pthread_attr_setscope;}
nsz 3c60f4
{int(*p)(pthread_t,int*restrict,struct sched_param*restrict) = pthread_getschedparam;}
nsz 3c60f4
{int(*p)(pthread_t,int,const struct sched_param*) = pthread_setschedparam;}
nsz 3c60f4
#endif
nsz b80923
}
nsz d7c151
#include <time.h>
nsz b80923
static void g()
nsz b80923
{
nsz 0ef264
{int(*p)(pthread_t,clockid_t*) = pthread_getcpuclockid;}
nsz 0ef264
{int(*p)(pthread_mutex_t*restrict,const struct timespec*restrict) = pthread_mutex_timedlock;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*restrict,const struct timespec*restrict) = pthread_rwlock_timedrdlock;}
nsz 0ef264
{int(*p)(pthread_rwlock_t*restrict,const struct timespec*restrict) = pthread_rwlock_timedwrlock;}
nsz d7c151
}