34 #include <bits/local_lim.h>
52 int pthread_once(pthread_once_t * once_control,
void (*init_routine)(
void))
56 fprintf( stdout,
"calling pthread_once(%p,%p)\n",
57 once_control, init_routine );
59 if ( *once_control ==
DONE )
return 0;
87 fprintf( stdout,
"calling pthread_key_create(%p,%p)\n", key,
destr );
89 for ( i = 0; i < PTHREAD_KEYS_MAX; i++ )
111 fprintf( stdout,
"calling pthread_key_delete(%d)\n", key );
131 fprintf( stdout,
"calling pthread_setspecific(%d,%p)\n", key, pointer );
146 fprintf( stdout,
"calling pthread_getspecific(%d)\n", key );
165 lalAbortHook(
"attempt to call pthread_cancel(%ld)\n", thread );
170 void * (*start_routine)(
void *),
void *arg)
172 lalAbortHook(
"attempt to call pthread_create(%p,%p,%p,%p)\n",
173 thread, attr, start_routine, arg );
180 thread_id, thread_return );
186 lalAbortHook(
"attempt to call pthread_sigmask(%d,%p,%p)\n",
187 how, newmask, oldmask );
void(* lalAbortHook)(const char *,...)
int pthread_once(pthread_once_t *once_control, void(*init_routine)(void))
int pthread_key_create(pthread_key_t *key, destr_function destr)
void * pthread_getspecific(pthread_key_t key)
int pthread_join(pthread_t thread_id, void **thread_return)
int pthread_sigmask(int how, const sigset_t *newmask, sigset_t *oldmask)
int pthread_cancel(pthread_t thread)
static void * pthread_key_values[PTHREAD_KEYS_MAX]
static struct pthread_key_struct pthread_keys[PTHREAD_KEYS_MAX]
int pthread_setspecific(pthread_key_t key, const void *pointer)
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
int pthread_key_delete(pthread_key_t key)
void(* destr_function)(void *)