File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,6 @@ target_link_libraries(barrier_main ${CMAKE_THREAD_LIBS_INIT})
59
59
add_executable (workq_main workq_main.c workq.c)
60
60
target_link_libraries (workq_main ${CMAKE_THREAD_LIBS_INIT} ${RT_LIB} )
61
61
62
+ # build tsd_once
63
+ add_executable (tsd_once tsd_once.c)
64
+ target_link_libraries (tsd_once ${CMAKE_THREAD_LIBS_INIT} )
Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ void *thread_routine (void *arg)
61
61
sleep (2 );
62
62
value = (tsd_t * )pthread_getspecific (tsd_key );
63
63
printf ("%s done...\n" , value -> string );
64
- return NULL ;
64
+ return NULL ;
65
65
}
66
66
67
- void main (int argc , char * argv [])
67
+ int main (int argc , char * argv [])
68
68
{
69
69
pthread_t thread1 , thread2 ;
70
70
int status ;
@@ -78,4 +78,5 @@ void main (int argc, char *argv[])
78
78
if (status != 0 )
79
79
err_abort (status , "Create thread 2" );
80
80
pthread_exit (NULL );
81
+ return 0 ;
81
82
}
You can’t perform that action at this time.
0 commit comments