X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5339a53824f6eb6d535f0e96bdf45df477871b1f..2aad2f9ce120b767be27c53e7d03b08a8e4e761f:/examples/smpi/mc/bugged1_liveness.c diff --git a/examples/smpi/mc/bugged1_liveness.c b/examples/smpi/mc/bugged1_liveness.c index f0f5219787..4b5b067d3b 100644 --- a/examples/smpi/mc/bugged1_liveness.c +++ b/examples/smpi/mc/bugged1_liveness.c @@ -1,3 +1,9 @@ +/***************** Centralized Mutual Exclusion Algorithm *********************/ +/* This example implements a centralized mutual exclusion algorithm. */ +/* Bug : CS requests of process 1 not satisfied */ +/* LTL property checked : G(r->F(cs)); (r=request of CS, cs=CS ok) */ +/******************************************************************************/ + #include #include #include @@ -19,11 +25,11 @@ static int predCS(){ int main(int argc, char **argv){ - //int i; int err, size, rank; int recv_buff; MPI_Status status; int CS_used = 0; + xbt_dynar_t requests = xbt_dynar_new(sizeof(int), NULL); /* Initialize MPI */ err = MPI_Init(&argc, &argv); @@ -43,12 +49,12 @@ int main(int argc, char **argv){ err = MPI_Comm_rank(MPI_COMM_WORLD, &rank); if(rank == 0){ /* Coordinator */ - //for(i=0; i