Ajout Résolution Anale 1
This commit is contained in:
22
ANALE-1/RESOLUTION/p2.c
Normal file
22
ANALE-1/RESOLUTION/p2.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/shm.h>
|
||||
#include "dijkstra.h"
|
||||
#include "commun.h"
|
||||
|
||||
void t3()
|
||||
{
|
||||
puts("t3");
|
||||
sleep(7);
|
||||
puts("end t3");
|
||||
}
|
||||
|
||||
int main () {
|
||||
int sem_t1 = sem_create (CLE_SEM_T1,0);
|
||||
int sem_t3 = sem_create (CLE_SEM_T3,0);
|
||||
P(sem_t1);
|
||||
t3();
|
||||
V(sem_t3);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user