1 /* Copyright (c) 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include "xbt/sysdep.h" /* calloc, printf */
11 /* Create a log channel to have nice outputs. */
13 #include "xbt/asserts.h"
14 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test,
15 "Messages specific for this msg example");
17 int simple_func(int argc, char *argv[]);
19 /** Emitter function */
20 int simple_func(int argc, char *argv[])
22 m_task_t task = MSG_task_create("task", 100, 0, NULL);
23 MSG_task_execute (task);
24 MSG_task_destroy (task);
29 int main(int argc, char *argv[])
31 MSG_global_init(&argc, argv);
33 printf("Usage: %s platform_file deployment_file\n", argv[0]);
37 char *platform_file = argv[1];
38 char *deployment_file = argv[2];
39 MSG_create_environment(platform_file);
41 MSG_function_register("master", simple_func);
42 MSG_function_register("slave", simple_func);
43 MSG_launch_application(deployment_file);