21 lines
No EOL
367 B
C
21 lines
No EOL
367 B
C
#include "logger.h"
|
|
#include <pthread.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
void* foo(void* arg) {
|
|
printf("Thread is running.\n");
|
|
warning("bbbvindiv");
|
|
sleep(10);
|
|
return NULL;
|
|
}
|
|
|
|
int main() {
|
|
pthread_t thread1;
|
|
pthread_create(&thread1, NULL, foo, NULL);
|
|
|
|
// Wait for thread to finish
|
|
pthread_join(thread1, NULL);
|
|
|
|
return 0;
|
|
} |