92 int flops1, flops2, flops3, flops4, flops5;
100 if (!
quiet) printf(
"Testing threads\n");
112 "PAPI_thread_init",
retval );
116 "PAPI_thread_init",
retval );
120 pthread_attr_init( &attr );
122 #ifdef PTHREAD_CREATE_UNDETACHED 123 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_UNDETACHED );
126 #ifdef PTHREAD_SCOPE_SYSTEM 127 retval = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
134 rc = pthread_create( &e_th, &attr,
Thread, (
void * ) &flops1 );
141 rc = pthread_create( &f_th, &attr,
Thread, (
void * ) &flops2 );
148 rc = pthread_create( &g_th, &attr,
Thread, (
void * ) &flops3 );
155 rc = pthread_create( &h_th, &attr,
Thread, (
void * ) &flops4 );
161 pthread_attr_destroy( &attr );
166 pthread_join( h_th, NULL );
167 pthread_join( g_th, NULL );
168 pthread_join( f_th, NULL );
169 pthread_join( e_th, NULL );
173 pthread_exit( NULL );
void test_pass(const char *filename)
unsigned long int pthread_t
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_thread_init(unsigned long int(*id_fn)(void))
int PAPI_library_init(int version)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)