mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Pass thread attr to pthread_create()
This commit is contained in:
parent
545dc2189d
commit
27f7ceab7d
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue