0ae69087
pfrison
Ajout des fichiers
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#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
}
|