X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a1d7fb09c29089971a104069a5b0af935892e41b..5e472a6023eb14e7396b16fa4eb47c805d8f4acf:/examples/msg/process-startkilltime/process-startkilltime.c diff --git a/examples/msg/process-startkilltime/process-startkilltime.c b/examples/msg/process-startkilltime/process-startkilltime.c index a738bac42d..6e12c39670 100644 --- a/examples/msg/process-startkilltime/process-startkilltime.c +++ b/examples/msg/process-startkilltime/process-startkilltime.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2007, 2009-2010, 2012-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2016. 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. */ @@ -8,19 +7,13 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); -/** @addtogroup MSG_examples - * - * - Life-Cycle: process-startkilltime/process-startkilltime.c. The creation and termination - * times of processes can be explicitly given in the deployment file (see *_d.xml files in example directory). - */ - -/** Executed on process termination*/ +/* Executed on process termination*/ static int my_onexit(void* ignored1, void *ignored2) { - XBT_INFO("Exiting now (done sleeping or got killed)."); /** - Just display an informative message (see tesh file) */ + XBT_INFO("Exiting now (done sleeping or got killed)."); /* - Just display an informative message (see tesh file) */ return 0; } -/** Just sleep until termination */ +/* Just sleep until termination */ static int sleeper(int argc, char *argv[]) { XBT_INFO("Hello! I go to sleep."); @@ -33,17 +26,15 @@ static int sleeper(int argc, char *argv[]) int main(int argc, char *argv[]) { - msg_error_t res = MSG_OK; - MSG_init(&argc, argv); xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n" "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]); - MSG_create_environment(argv[1]); /** - Load the platform description */ + MSG_create_environment(argv[1]); /* - Load the platform description */ MSG_function_register("sleeper", sleeper); - MSG_launch_application(argv[2]); /** - Deploy the @ref sleeper processes with explicit start/kill times */ + MSG_launch_application(argv[2]); /* - Deploy the sleeper processes with explicit start/kill times */ - res = MSG_main(); /** - Run the simulation */ + msg_error_t res = MSG_main(); /* - Run the simulation */ XBT_INFO("Simulation time %g", MSG_get_clock()); return res != MSG_OK; }