diff options
Diffstat (limited to 'linuxthreads/Examples/ex1.c')
-rw-r--r-- | linuxthreads/Examples/ex1.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/linuxthreads/Examples/ex1.c b/linuxthreads/Examples/ex1.c index c399fab894..f455ecfaf0 100644 --- a/linuxthreads/Examples/ex1.c +++ b/linuxthreads/Examples/ex1.c @@ -17,15 +17,15 @@ void * process(void * arg) return NULL; } -int main() +int main(void) { int retcode; pthread_t th_a, th_b; void * retval; - retcode = pthread_create(&th_a, NULL, process, "a"); + retcode = pthread_create(&th_a, NULL, process, (void *) "a"); if (retcode != 0) fprintf(stderr, "create a failed %d\n", retcode); - retcode = pthread_create(&th_b, NULL, process, "b"); + retcode = pthread_create(&th_b, NULL, process, (void *) "b"); if (retcode != 0) fprintf(stderr, "create b failed %d\n", retcode); retcode = pthread_join(th_a, &retval); if (retcode != 0) fprintf(stderr, "join a failed %d\n", retcode); @@ -33,4 +33,3 @@ int main() if (retcode != 0) fprintf(stderr, "join b failed %d\n", retcode); return 0; } - |