Pass thread attr to pthread_create()

This commit is contained in:
Justin Ethier 2016-12-19 18:59:47 -05:00
parent 545dc2189d
commit 27f7ceab7d

View file

@ -4768,7 +4768,7 @@ to look at the lock-free structures provided by ck?
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (pthread_create(&thread, NULL, Cyc_init_thread, thread_and_thunk)) {
if (pthread_create(&thread, &attr, Cyc_init_thread, thread_and_thunk)) {
fprintf(stderr, "Error creating a new thread\n");
exit(1);
}