Skip to content

Commit 1a1c25a

Browse files
committed
added tsd_destructor to build
1 parent 95f2e76 commit 1a1c25a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ target_link_libraries(workq_main ${CMAKE_THREAD_LIBS_INIT} ${RT_LIB})
6262
# build tsd_once
6363
add_executable(tsd_once tsd_once.c)
6464
target_link_libraries(tsd_once ${CMAKE_THREAD_LIBS_INIT})
65+
66+
# build tsd_destructor.c
67+
add_executable(tsd_destructor tsd_destructor.c)
68+
target_link_libraries(tsd_destructor ${CMAKE_THREAD_LIBS_INIT})

tsd_destructor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ void *thread_routine (void *arg)
7979
value->string = (char*)arg;
8080
printf ("thread \"%s\" starting...\n", value->string);
8181
sleep (2);
82-
return NULL;
82+
return NULL;
8383
}
8484

85-
void main (int argc, char *argv[])
85+
int main (int argc, char *argv[])
8686
{
8787
pthread_t thread_1, thread_2;
8888
private_t *value;

tsd_once.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ int main (int argc, char *argv[])
7878
if (status != 0)
7979
err_abort (status, "Create thread 2");
8080
pthread_exit (NULL);
81-
return 0;
8281
}

0 commit comments

Comments
 (0)