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-effective-target non_bionic }
8 // { dg-require-cxa-atexit "" }
9 // { dg-options -pthread }
10 // { dg-add-options tls }
25 void *thread_main(void *)
38 pthread_create (&thread, 0, thread_main, 0);
39 pthread_cancel(thread);
40 pthread_join(thread, 0);
41 pthread_create (&thread, 0, thread_main, 0);
42 pthread_cancel(thread);
43 pthread_join(thread, 0);