Ajout exo5

This commit is contained in:
2025-08-17 13:25:54 +00:00
parent 9744c9612c
commit b92c10d3d8
4 changed files with 61 additions and 0 deletions

View File

@@ -9,6 +9,8 @@
*/
int sem_create(key_t cle, int initval);
/**
* take a token on the semaphore semid or wait if none available
*/

View File

@@ -20,7 +20,12 @@ void t2()
}
int main () {
int semt1 = sem_create(CLE_SEM_T1,0);
int semt2 = sem_create(CLE_SEM_T2,0);
t1();
V(semt1);
t2();
V(semt2);
return 0;
}