1 // Test for cleanups with pthread_cancel.
4 // { dg-require-effective-target c++11 }
5 // { dg-require-effective-target tls_runtime }
6 // { dg-require-effective-target pthread }
7 // { dg-require-alias }
8 // { dg-require-cxa-atexit "" }
9 // { dg-options -pthread }
24 void *thread_main(void *)
37 pthread_create (&thread, 0, thread_main, 0);
38 pthread_cancel(thread);
39 pthread_join(thread, 0);
40 pthread_create (&thread, 0, thread_main, 0);
41 pthread_cancel(thread);
42 pthread_join(thread, 0);