From 1bec72ac5423ee42eed942337b2a8a0a5c82c530 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Thu, 14 Apr 2016 13:12:04 +0200 Subject: [PATCH] document all process- examples --- doc/Doxyfile.in | 9 +++++---- examples/msg/process-kill/process-kill.c | 2 +- .../msg/process-migration/process-migration.c | 4 ++-- .../process-startkilltime.c | 16 ++++++++++++---- examples/msg/process-suspend/process-suspend.c | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 982db2cd6d..12601ad858 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -704,9 +704,7 @@ INPUT += @CMAKE_HOME_DIRECTORY@/examples/msg/app-pingpong/app-pi @CMAKE_HOME_DIRECTORY@/examples/msg/process-suspend/process-suspend.c \ @CMAKE_HOME_DIRECTORY@/examples/msg/process-kill/process-kill.c \ @CMAKE_HOME_DIRECTORY@/examples/msg/process-migration/process-migration.c \ - @CMAKE_HOME_DIRECTORY@/examples/msg/task-priority/task-priority.c \ - @CMAKE_HOME_DIRECTORY@/examples/msg/properties \ - @CMAKE_HOME_DIRECTORY@/examples/msg/parallel_task \ + @CMAKE_HOME_DIRECTORY@/examples/msg/process-startkilltime/process-startkilltime.c \ @CMAKE_HOME_DIRECTORY@/examples/msg/trace-simple/trace-simple.c \ @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/ms.c \ @CMAKE_HOME_DIRECTORY@/examples/msg/tracing/categories.c \ @@ -720,7 +718,10 @@ INPUT += @CMAKE_HOME_DIRECTORY@/examples/msg/app-pingpong/app-pi @CMAKE_HOME_DIRECTORY@/examples/msg/gpu \ @CMAKE_HOME_DIRECTORY@/examples/msg/actions \ @CMAKE_HOME_DIRECTORY@/examples/msg/pmm \ - @CMAKE_HOME_DIRECTORY@/examples/msg/chord + @CMAKE_HOME_DIRECTORY@/examples/msg/chord\ + @CMAKE_HOME_DIRECTORY@/examples/msg/task-priority/task-priority.c \ + @CMAKE_HOME_DIRECTORY@/examples/msg/properties \ + @CMAKE_HOME_DIRECTORY@/examples/msg/parallel_task # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/examples/msg/process-kill/process-kill.c b/examples/msg/process-kill/process-kill.c index ed6c62251c..e345301c88 100644 --- a/examples/msg/process-kill/process-kill.c +++ b/examples/msg/process-kill/process-kill.c @@ -9,7 +9,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_kill, "Messages specific for this msg example"); /** @addtogroup MSG_examples * - * - Process Killing: process-kill/process-kill.c. Processes can also be killed by another if needed thanks to + * - Killing: process-kill/process-kill.c. Processes can also be killed by another if needed thanks to * the @ref MSG_process_kill function. */ diff --git a/examples/msg/process-migration/process-migration.c b/examples/msg/process-migration/process-migration.c index 7728ac9b97..bb37b976ff 100644 --- a/examples/msg/process-migration/process-migration.c +++ b/examples/msg/process-migration/process-migration.c @@ -11,8 +11,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_migration, "Messages specific for this /** @addtogroup MSG_examples * - * - Process Migration: process-migration/process-migration.c. Processes can move or be moved from a host to - * another while they are running thanks to the @ref MSG_process_migrate function. + * - Migration: process-migration/process-migration.c. Processes can move or be moved from a host to another + * while they are running thanks to the @ref MSG_process_migrate function. */ xbt_mutex_t checkpoint = NULL; diff --git a/examples/msg/process-startkilltime/process-startkilltime.c b/examples/msg/process-startkilltime/process-startkilltime.c index 0de9b4a2e3..a738bac42d 100644 --- a/examples/msg/process-startkilltime/process-startkilltime.c +++ b/examples/msg/process-startkilltime/process-startkilltime.c @@ -8,11 +8,19 @@ 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*/ static int my_onexit(void* ignored1, void *ignored2) { - XBT_INFO("Exiting now (done sleeping or got killed)."); + XBT_INFO("Exiting now (done sleeping or got killed)."); /** - Just display an informative message (see tesh file) */ return 0; } +/** Just sleep until termination */ static int sleeper(int argc, char *argv[]) { XBT_INFO("Hello! I go to sleep."); @@ -31,11 +39,11 @@ int main(int argc, char *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]); + MSG_create_environment(argv[1]); /** - Load the platform description */ MSG_function_register("sleeper", sleeper); - MSG_launch_application(argv[2]); + MSG_launch_application(argv[2]); /** - Deploy the @ref sleeper processes with explicit start/kill times */ - res = MSG_main(); + res = MSG_main(); /** - Run the simulation */ XBT_INFO("Simulation time %g", MSG_get_clock()); return res != MSG_OK; } diff --git a/examples/msg/process-suspend/process-suspend.c b/examples/msg/process-suspend/process-suspend.c index 3f602810be..cdafaf106c 100644 --- a/examples/msg/process-suspend/process-suspend.c +++ b/examples/msg/process-suspend/process-suspend.c @@ -15,7 +15,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_process_suspend, "Messages specific for this ms /** @addtogroup MSG_examples * @section MSG_ex_process Acting on Processes * - * - Process Suspend/Resume: process-suspend/process-suspend.c. Processes can be suspended and resumed during + * - Suspend/Resume: process-suspend/process-suspend.c. Processes can be suspended and resumed during * their executions thanks to the @ref MSG_process_suspend and @ref MSG_process_resume functions. */ -- 2.20.1