X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4586126e5a968926d9c937fb5b6e39eff37a2bd3..ed9b07e5c0c7eb6d4d38b0fe5aaea80d6996a8a7:/examples/msg/mc/centralized_mutex.c diff --git a/examples/msg/mc/centralized_mutex.c b/examples/msg/mc/centralized_mutex.c index 22d1beaf02..2d8b231ab9 100644 --- a/examples/msg/mc/centralized_mutex.c +++ b/examples/msg/mc/centralized_mutex.c @@ -1,10 +1,16 @@ +/* Copyright (c) 2010-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + /***************** Centralized Mutual Exclusion Algorithm *********************/ /* This example implements a centralized mutual exclusion algorithm. */ /* There is no bug on it, it is just provided to test the state space */ /* reduction of DPOR. */ /******************************************************************************/ -#include "msg/msg.h" +#include "simgrid/msg.h" #define AMOUNT_OF_CLIENTS 4 #define CS_PER_PROCESS 2 @@ -38,7 +44,7 @@ int coordinator(int argc, char *argv[]) XBT_INFO("CS release. Grant to queued requests (queue size: %lu)", xbt_dynar_length(requests)); char *req; - xbt_dynar_pop(requests, &req); + xbt_dynar_shift(requests, &req); MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req); todo--; } else { // nobody wants it