X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3203ed1f4fb6f4617e94d5351661ba07e8b8f833..77537f25120f01141d7d9b669ad8178330531e00:/examples/msg/actions/actions.c diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index 5e2a82d9fc..f8b1b886df 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -8,7 +8,6 @@ #include #include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */ #include "simgrid/simix.h" /* semaphores for the barrier */ -#include "xbt.h" /* calloc, printf */ #include /** @addtogroup MSG_examples @@ -230,8 +229,8 @@ static void action_barrier(const char *const *action) processes_arrived_sofar--; if (!processes_arrived_sofar) { - simcall_cond_destroy(cond); - simcall_mutex_destroy(mutex); + SIMIX_cond_destroy(cond); + SIMIX_mutex_destroy(mutex); mutex = NULL; } } @@ -481,20 +480,18 @@ int main(int argc, char *argv[]) /* Explicit initialization of the action module is required now*/ MSG_action_init(); - if (argc < 3) { - printf("Usage: %s platform_file deployment_file [action_files]\n", argv[0]); - printf - ("example: %s msg_platform.xml msg_deployment.xml actions # if all actions are in the same file\n", - argv[0]); - printf - ("example: %s msg_platform.xml msg_deployment.xml # if actions are in separate files, specified in deployment\n", - argv[0]); - exit(1); - } + xbt_assert(argc > 2, + "Usage: %s platform_file deployment_file [action_files]\n" + "\t# if all actions are in the same file\n" + "\tExample: %s msg_platform.xml msg_deployment.xml actions\n" + "\t# if actions are in separate files, specified in deployment\n" + "\tExample: %s msg_platform.xml msg_deployment.xml ", + argv[0],argv[0],argv[0]); + printf("WARNING: THIS BINARY IS KINDA DEPRECATED\n" - "This example is still relevant if you want to learn about MSG-based trace replay, " - "but if you want to simulate MPI-like traces, you should use the newer version " - "that is in the examples/smpi/replay directory instead.\n"); + "This example is still relevant if you want to learn about MSG-based trace replay, " + "but if you want to simulate MPI-like traces, you should use the newer version " + "that is in the examples/smpi/replay directory instead.\n"); /* Simulation setting */ MSG_create_environment(argv[1]); @@ -527,8 +524,5 @@ int main(int argc, char *argv[]) /* Explicit finalization of the action module is required now*/ MSG_action_exit(); - if (res == MSG_OK) - return 0; - else - return 1; + return res != MSG_OK; } /* end_of_main */