X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e9f97aeb3a3b0843cf7429cb586e4149636918e..5e472a6023eb14e7396b16fa4eb47c805d8f4acf:/examples/msg/mc/bugged2_liveness.c diff --git a/examples/msg/mc/bugged2_liveness.c b/examples/msg/mc/bugged2_liveness.c index b82e3ac05c..8d4f99b080 100644 --- a/examples/msg/mc/bugged2_liveness.c +++ b/examples/msg/mc/bugged2_liveness.c @@ -28,12 +28,12 @@ static int coordinator(int argc, char *argv[]) const char *kind = MSG_task_get_name(task); //is it a request or a release? if (!strcmp(kind, "request")) { // that's a request char *req = MSG_task_get_data(task); - if (CS_used) { + if (CS_used) { XBT_INFO("CS already used."); msg_task_t answer = MSG_task_create("not grant", 0, 1000, NULL); MSG_task_send(answer, req); - } else { // can serve it immediatly - XBT_INFO("CS idle. Grant immediatly"); + } else { // can serve it immediately + XBT_INFO("CS idle. Grant immediately"); msg_task_t answer = MSG_task_create("grant", 0, 1000, NULL); MSG_task_send(answer, req); CS_used = 1; @@ -53,7 +53,6 @@ static int client(int argc, char *argv[]) { int my_pid = MSG_process_get_PID(MSG_process_self()); char *my_mailbox = xbt_strdup(argv[1]); - const char* kind; while(1){ XBT_INFO("Client (%s) asks the request", my_mailbox); @@ -62,7 +61,7 @@ static int client(int argc, char *argv[]) msg_task_t answer = NULL; MSG_task_receive(&answer, my_mailbox); - kind = MSG_task_get_name(answer); + const char* kind = MSG_task_get_name(answer); if (!strcmp(kind, "grant")) { XBT_INFO("Client (%s) got the answer (grant). Sleep a bit and release it", my_mailbox);