X-Git-Url: https://git.piment-noir.org/?p=TD_SE.git;a=blobdiff_plain;f=threads%2Fexemple1.c;fp=threads%2Fexemple1.c;h=571f7e1afdb68e8ba039e0c3c0f0c2557bb7c597;hp=d8cc0edbcc162b4bcb86df884b6044aa3bd6db63;hb=151a0f5636afe11afad9428f737e71372a4c24e4;hpb=4ed359e8f4a3ded5357fd63f276dafec2642cb57 diff --git a/threads/exemple1.c b/threads/exemple1.c index d8cc0ed..571f7e1 100644 --- a/threads/exemple1.c +++ b/threads/exemple1.c @@ -6,7 +6,7 @@ #include #include -void afficher(int n, char lettre) +static void afficher(int n, char lettre) { int j; for (j = 1; j < n; j++) { @@ -15,7 +15,7 @@ void afficher(int n, char lettre) } } -void *threadA(void *inutilise) +static void *threadA(void *inutilise) { afficher(100, 'A'); printf("\n Fin du thread A\n"); @@ -23,7 +23,7 @@ void *threadA(void *inutilise) pthread_exit(NULL); } -void *threadC(void *inutilise) +static void *threadC(void *inutilise) { afficher(150, 'C'); printf("\n Fin du thread C\n"); @@ -31,7 +31,7 @@ void *threadC(void *inutilise) pthread_exit(NULL); } -void *threadB(void *inutilise) +static void *threadB(void *inutilise) { pthread_t thC; pthread_create(&thC, NULL, threadC, NULL);