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
[mc] Test if the stack-cleaner has any effect
[simgrid.git]
/
examples
/
msg
/
mc
/
bugged2_liveness.c
diff --git
a/examples/msg/mc/bugged2_liveness.c
b/examples/msg/mc/bugged2_liveness.c
index
fb7c2d8
..
d6beac0
100644
(file)
--- a/
examples/msg/mc/bugged2_liveness.c
+++ b/
examples/msg/mc/bugged2_liveness.c
@@
-1,3
+1,9
@@
+/* Copyright (c) 2012-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. */
+
/***************************** Bugged2 ****************************************/
/* This example implements a centralized mutual exclusion algorithm. */
/* One client stay always in critical section */
/***************************** Bugged2 ****************************************/
/* This example implements a centralized mutual exclusion algorithm. */
/* One client stay always in critical section */
@@
-35,7
+41,6
@@
int coordinator(int argc, char *argv[])
XBT_INFO("CS already used.");
msg_task_t answer = MSG_task_create("not grant", 0, 1000, NULL);
MSG_task_send(answer, req);
XBT_INFO("CS already used.");
msg_task_t answer = MSG_task_create("not grant", 0, 1000, NULL);
MSG_task_send(answer, req);
- MC_compare();
} else { // can serve it immediatly
XBT_INFO("CS idle. Grant immediatly");
msg_task_t answer = MSG_task_create("grant", 0, 1000, NULL);
} else { // can serve it immediatly
XBT_INFO("CS idle. Grant immediatly");
msg_task_t answer = MSG_task_create("grant", 0, 1000, NULL);
@@
-56,7
+61,7
@@
int coordinator(int argc, char *argv[])
int client(int argc, char *argv[])
{
int my_pid = MSG_process_get_PID(MSG_process_self());
int client(int argc, char *argv[])
{
int my_pid = MSG_process_get_PID(MSG_process_self());
- char *my_mailbox =
bprintf("%s",
argv[1]);
+ char *my_mailbox =
xbt_strdup(
argv[1]);
const char* kind;
while(1){
const char* kind;
while(1){