diff --git a/thread.c b/thread.c new file mode 100644 index 0000000..e3fa269 --- /dev/null +++ b/thread.c @@ -0,0 +1,14 @@ +#include +#include + +void *worker(void *arg) { + printf("Hello from thread\n"); + return NULL; +} + +int main() { + pthread_t thread; + pthread_create(&thread, NULL, worker, NULL); + pthread_join(thread, NULL); + return 0; +}