Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <pthread.h>
- void* greet(void* args) {
- printf("Hello from the thread!");
- pthread_exit(0);
- }
- int main() {
- pthread_t thrd;
- pthread_create(&thrd, NULL, greet, NULL);
- pthread_join(thrd, NULL);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement