Add return value to pthread test function

pull/739/head
Jeffrey Walton 2018-11-13 13:43:20 -05:00
parent dd6af58c98
commit 69a00192b9
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 15 additions and 14 deletions

View File

@ -1,14 +1,15 @@
#include <string> #include <string>
#include <pthreads.h> #include <pthread.h>
void* function(void *ptr) void* function(void *ptr)
{ {
} return 0;
}
int main(int argc, char* argv[])
{ int main(int argc, char* argv[])
pthread_t thread; {
int ret = pthread_create(&thread, NULL, function, (void*)0); pthread_t thread;
pthread_join(thread, NULL); int ret = pthread_create(&thread, NULL, function, (void*)0);
return 0; pthread_join(thread, NULL);
} return 0;
}