6 #include <gnu/lib-names.h>
11 void *h
= dlopen (LIBM_SO
, RTLD_LAZY
);
14 printf ("dlopen failed: %s\n", dlerror ());
17 if (dlsym (h
, "sin") == NULL
)
19 printf ("dlsym failed: %s\n", dlerror ());
24 printf ("dlclose failed: %s\n", dlerror ());
36 for (int i
= 0; i
< N
; ++i
)
38 int e
= pthread_create (&th
[i
], NULL
, tf
, NULL
);
41 printf ("pthread_create failed with %d (%s)\n", e
, strerror (e
));
45 for (int i
= 0; i
< N
; ++i
)
48 int e
= pthread_join (th
[i
], &res
);
49 if (e
!= 0 || res
!= NULL
)
51 puts ("thread failed");
58 #define TEST_FUNCTION do_test ()
59 #include "../test-skeleton.c"