14 lines
254 B
C
14 lines
254 B
C
#include <pthread.h>
|
|
#include <stdio.h>
|
|
|
|
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;
|
|
}
|