X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c66deda6497d36e70e2485fff5431151be1713c6..558e19f535bb0c65b610bc758c8133ded549ca3c:/teshsuite/msg/host_on_off_processes/host_on_off_processes.c diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c index a76bd53074..9b5bcd2722 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c @@ -1,10 +1,9 @@ -/* Copyright (c) 2010-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. 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. */ -#include "simgrid/msg.h" /* Yeah! If you want to use msg, you need to include simgrid/msg.h */ +#include "simgrid/msg.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); @@ -37,10 +36,9 @@ static int process_sleep(int argc, char *argv[]) static int commTX(int argc, char *argv[]) { - msg_task_t task = NULL; const char * mailbox = "comm"; XBT_INFO(" Start TX"); - task = MSG_task_create("COMM", 0, 100000000, NULL); + msg_task_t task = MSG_task_create("COMM", 0, 100000000, NULL); MSG_task_isend(task, mailbox); // We should wait a bit (if not the process will end before the communication, hence an exception on the other side). MSG_process_sleep(30); @@ -61,7 +59,7 @@ static int commRX(int argc, char *argv[]) } else if (error==MSG_TRANSFER_FAILURE) { XBT_INFO(" Receive message: TRANSFERT_FAILURE"); } else { - XBT_INFO(" Receive message: %d", error); + XBT_INFO(" Receive message: %u", error); } XBT_INFO(" RX Done"); return 0; @@ -181,7 +179,7 @@ static int test_launcher(int argc, char *argv[]) argvF = xbt_new(char*, 2); argvF[0] = xbt_strdup("process_daemon"); - daemon = MSG_process_create_with_arguments("process_daemon", process_daemon, NULL, vm0, 1, argvF); + daemon = MSG_process_create_with_arguments("process_daemon", process_daemon, NULL, (msg_host_t)vm0, 1, argvF); argvF = xbt_new(char*, 2); argvF[0] = xbt_strdup("process_daemonJUPI");