X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/49e85177c669d793e84242983a1b1f430e47184e..595e59c568ff5f8510de201bfd800951cdc2adcb:/examples/msg/mc/electric_fence.c diff --git a/examples/msg/mc/electric_fence.c b/examples/msg/mc/electric_fence.c index 0e031419ca..f260cd989b 100644 --- a/examples/msg/mc/electric_fence.c +++ b/examples/msg/mc/electric_fence.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* Copyright (c) 2013-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,17 +11,15 @@ /* --cfg=model-check/max_depth:) is reached. */ /******************************************************************************/ -#include +#include #include #define N 2 XBT_LOG_NEW_DEFAULT_CATEGORY(electric_fence, "Example to check the soundness of DPOR"); -int server(int argc, char *argv[]); -int client(int argc, char *argv[]); -int server(int argc, char *argv[]) +static int server(int argc, char *argv[]) { msg_task_t task1 = NULL, task2 = NULL; msg_comm_t comm_received1 = NULL, comm_received2 = NULL; @@ -36,32 +34,26 @@ int server(int argc, char *argv[]) return 0; } -int client(int argc, char *argv[]) +static int client(int argc, char *argv[]) { - msg_task_t task = MSG_task_create(argv[1], 0, 10000, NULL); MSG_task_send(task, "mymailbox"); - + XBT_INFO("Sent!"); return 0; } int main(int argc, char *argv[]) { - MSG_init(&argc, argv); MSG_create_environment("platform.xml"); MSG_function_register("server", server); - MSG_function_register("client", client); - MSG_launch_application("deploy_electric_fence.xml"); MSG_main(); - return 0; - }