-/* 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
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "msg/msg.h"
+#include "simgrid/msg.h"
#include "xbt/log.h"
XBT_LOG_NEW_DEFAULT_CATEGORY(storage,"Messages specific for this simulation");
int server(int argc, char *argv[])
{
msg_task_t to_execute = NULL;
- _XBT_GNUC_UNUSED int res;
+ XBT_ATTRIB_UNUSED int res;
storage_info(MSG_host_self());
MSG_init(&argc, argv);
/* Check the arguments */
- if (argc < 3) {
- printf("Usage: %s platform_file deployment_file \n", argv[0]);
- return -1;
- }
+ xbt_assert(argc > 2,"Usage: %s platform_file deployment_file \n", argv[0]);
const char *platform_file = argv[1];
const char *deployment_file = argv[2];
msg_error_t res = MSG_main();
XBT_INFO("Simulated time: %g", MSG_get_clock());
- if (res == MSG_OK)
- return 0;
- else
- return 1;
+ return res != MSG_OK;
}