A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change sg_storage_size_t to sg_size_t and fix surf network bug
[simgrid.git]
/
examples
/
msg
/
mc
/
centralized_mutex.c
diff --git
a/examples/msg/mc/centralized_mutex.c
b/examples/msg/mc/centralized_mutex.c
index
22d1bea
..
3403c88
100644
(file)
--- a/
examples/msg/mc/centralized_mutex.c
+++ b/
examples/msg/mc/centralized_mutex.c
@@
-1,3
+1,10
@@
+/* Copyright (c) 2010-2012. 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 */
/***************** 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 */
@@
-38,7
+45,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_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
MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
todo--;
} else { // nobody wants it