1 /* Test case by Hui Huang <hui.huang@sun.com>. */
9 start_routine (void *args)
12 void **addrs = (void **) args;
13 for (i = 0; i < 10000; ++i)
14 addrs[i % 1024] = dlsym (NULL, "does_not_exist");
23 pthread_t tid1, tid2, tid3;
29 if (pthread_create (&tid1, NULL, start_routine, addrs1) != 0)
31 puts ("1st create failed");
34 if (pthread_create (&tid2, NULL, start_routine, addrs2) != 0)
36 puts ("2nd create failed");
39 if (pthread_create (&tid3, NULL, start_routine, addrs3) != 0)
41 puts ("3rd create failed");
45 if (pthread_join (tid1, NULL) != 0)
47 puts ("1st join failed");
50 if (pthread_join (tid2, NULL) != 0)
52 puts ("2nd join failed");
55 if (pthread_join (tid3, NULL) != 0)
57 puts ("2rd join failed");
65 #define TEST_FUNCTION do_test ()
66 #include "../test-skeleton.c"