Skip to content

Commit 486764f

Browse files
committed
Initialize attributes before creating thread
1 parent 9ae0de4 commit 486764f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/util.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ tid_t thread_start (thread_worker_t worker, void *args)
77
tid_t tid = -1;
88
pthread_attr_t attr;
99

10+
/* init thread attributes */
11+
pthread_attr_init(&attr);
12+
1013
pthread_create(&tid, &attr, worker, args);
1114
return tid;
1215
}

0 commit comments

Comments
 (0)