Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : update bugged mutual exclusion algorithm
[simgrid.git] / examples / msg / mc / bugged1_liveness.c
index bd59651..b6949dd 100644 (file)
@@ -51,7 +51,7 @@ int coordinator(int argc, char *argv[])
     } else {      
       if (!xbt_dynar_is_empty(requests)) {
         XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests));
     } else {      
       if (!xbt_dynar_is_empty(requests)) {
         XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests));
-        xbt_dynar_pop(requests, &req);
+        xbt_dynar_shift(requests, &req);
         if(strcmp(req, "1") != 0){
           MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
         }else{
         if(strcmp(req, "1") != 0){
           MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
         }else{