From: cristianrosa Date: Mon, 17 May 2010 12:25:51 +0000 (+0000) Subject: Improve comments on examples X-Git-Tag: v3_5~1057 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f18ab288219690177e48123c64ba809bd421f02a?hp=f85421b192d9ec5505120536e00df7252dad0cfe Improve comments on examples git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7751 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/msg/mc/bugged1.c b/examples/msg/mc/bugged1.c index 23b783e1d6..43e4cb44a7 100644 --- a/examples/msg/mc/bugged1.c +++ b/examples/msg/mc/bugged1.c @@ -1,3 +1,8 @@ +/******************** Non-deterministic message ordering *********************/ +/* Server assumes a fixed order in the reception of messages from its clients */ +/* which is incorrect because the message ordering is non-deterministic */ +/******************************************************************************/ + #include #include #define N 3 diff --git a/examples/msg/mc/bugged2.c b/examples/msg/mc/bugged2.c index b7d2b65f2c..180db605e0 100644 --- a/examples/msg/mc/bugged2.c +++ b/examples/msg/mc/bugged2.c @@ -1,3 +1,8 @@ +/******************** Non-deterministic message ordering *********************/ +/* Server assumes a fixed order in the reception of messages from its clients */ +/* which is incorrect because the message ordering is non-deterministic */ +/******************************************************************************/ + #include #include #define N 3 diff --git a/examples/msg/mc/centralized_mutex.c b/examples/msg/mc/centralized_mutex.c index ecb747f5f5..73b27eb018 100644 --- a/examples/msg/mc/centralized_mutex.c +++ b/examples/msg/mc/centralized_mutex.c @@ -1,14 +1,12 @@ -/* Centralized Mutual Exclusion Algorithm - * - * This constitutes the answer to the exercice 2 of the practical - * lab on implementing mutual exclusion algorithms with SimGrid. - * - * YOU SHOULD TRY IMPLEMENTING IT YOURSELF BEFORE READING THE SOLUTION. - */ +/***************** 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" -#define AMOUNT_OF_CLIENTS 5 +#define AMOUNT_OF_CLIENTS 4 #define CS_PER_PROCESS 2 XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages"); diff --git a/examples/msg/mc/deploy_mutex.xml b/examples/msg/mc/deploy_mutex.xml index 0ff13e2a1c..53165b8b0d 100644 --- a/examples/msg/mc/deploy_mutex.xml +++ b/examples/msg/mc/deploy_mutex.xml @@ -14,9 +14,9 @@ - +