X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/00e8231fa94528961cddaa1fe35e232de5438e76:/teshsuite/simdag/platforms/ring_call.c..4a8dc1f6c73ac34ea13dc0074444345d36279902:/examples/msg/token_ring/ring_call.c diff --git a/teshsuite/simdag/platforms/ring_call.c b/examples/msg/token_ring/ring_call.c similarity index 89% rename from teshsuite/simdag/platforms/ring_call.c rename to examples/msg/token_ring/ring_call.c index d029335942..3251748ebc 100644 --- a/teshsuite/simdag/platforms/ring_call.c +++ b/examples/msg/token_ring/ring_call.c @@ -6,7 +6,6 @@ #include #include -#include "simdag/simdag.h" #include "surf/surf_private.h" extern routing_global_t global_routing; @@ -19,15 +18,6 @@ int slave(int argc, char *argv[]); XBT_LOG_NEW_DEFAULT_CATEGORY(ring, "Messages specific for this msg example"); -static int name_compare_hosts(const void *n1, const void *n2) -{ - char name1[80], name2[80]; - strcpy(name1, SD_workstation_get_name(*((SD_workstation_t *) n1))); - strcpy(name2, SD_workstation_get_name(*((SD_workstation_t *) n2))); - - return strcmp(name1, name2); -} - int master(int argc, char *argv[]) { m_task_t task_s = NULL; @@ -41,7 +31,7 @@ int master(int argc, char *argv[]) sprintf(mailbox, "host%d", num+1); if(num == totalHosts-1) sprintf(mailbox, "host%d", 0); - sprintf(buffer, "Hello"); + sprintf(buffer, "Token"); task_s = MSG_task_create(buffer, task_comp_size, @@ -80,7 +70,7 @@ int slave(int argc, char *argv[]) sprintf(mailbox, "host%d", num+1); if(num == totalHosts-1) sprintf(mailbox, "host%d", 0); - sprintf(buffer, "Hello"); + sprintf(buffer, "Token"); task_s = MSG_task_create(buffer, task_comp_size, task_comm_size, @@ -110,7 +100,7 @@ static int surf_parse_bypass_application(void) SURFXML_START_TAG(platform); - INFO1("process : %s en master",MSG_host_get_name(hosts[0])); + DEBUG1("process : %s en master",MSG_host_get_name(hosts[0])); /* */ SURFXML_BUFFER_SET(process_host, MSG_host_get_name(hosts[0])); SURFXML_BUFFER_SET(process_function, "master"); @@ -126,7 +116,7 @@ static int surf_parse_bypass_application(void) for(i=1;i */ SURFXML_BUFFER_SET(process_host,MSG_host_get_name(hosts[i]) ); SURFXML_BUFFER_SET(process_function, "slave");