Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the MSG process-kill example to teshsuite
[simgrid.git] / teshsuite / msg / process-kill / process-kill.c
similarity index 87%
rename from examples/msg/process-kill/process-kill.c
rename to teshsuite/msg/process-kill/process-kill.c
index 657c5cc..37ee439 100644 (file)
@@ -14,7 +14,7 @@ static int victimA_fun(int argc, char* argv[])
   MSG_process_suspend(MSG_process_self()); /* - First suspend itself */
   XBT_INFO("OK, OK. Let's work");          /* - Then is resumed and start to execute a task */
   MSG_task_execute(MSG_task_create("work", 1e9, 0, NULL));
-  XBT_INFO("Bye!");  /* - But will never reach the end of it */
+  XBT_INFO("Bye!"); /* - But will never reach the end of it */
   return 0;
 }
 
@@ -24,9 +24,9 @@ static int victimB_fun(int argc, char* argv[])
   return 0;
 }
 
-static int killer(int argc, char *argv[])
+static int killer(int argc, charargv[])
 {
-  XBT_INFO("Hello!");         /* - First start a victim process */
+  XBT_INFO("Hello!"); /* - First start a victim process */
   msg_process_t victimA = MSG_process_create("victim A", victimA_fun, NULL, MSG_host_by_name("Fafard"));
   msg_process_t victimB = MSG_process_create("victim B", victimB_fun, NULL, MSG_host_by_name("Bourassa"));
   MSG_process_sleep(10.0);
@@ -47,12 +47,12 @@ static int killer(int argc, char *argv[])
   return 0;
 }
 
-int main(int argc, char *argv[])
+int main(int argc, charargv[])
 {
   MSG_init(&argc, argv);
   xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
 
-  MSG_create_environment(argv[1]);   /* - Load the platform description */
+  MSG_create_environment(argv[1]); /* - Load the platform description */
   /* - Create and deploy killer process, that will create the victim process  */
   MSG_process_create("killer", killer, NULL, MSG_host_by_name("Tremblay"));