Squelette_threads.c
469 Bytes
#include <stdio.h>
#include <pthread.h>
void *thread_fonction(void *arg){
// TODO thread code
pthread_exit(NULL);
}
int main(void){
// TODO initialisation ?
// Création du Thread
pthread_t tid;
// TODO thread args ?
pthread_create(&tid, NULL, thread_fonction, /*args ici ->*/NULL);
// pthread_detach(tid); ou pthread_join(tid, NULL); ?
// (il en faut au moins un des deux et un seul des deux)
// TODO suite du programme
}