Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mess with mc examples platform
[simgrid.git] / examples / deprecated / msg / mc / centralized_mutex.c
index 771cd46..34cc490 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2019. The SimGrid Team.
+/* Copyright (c) 2010-2020. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -16,7 +16,7 @@
 #define CS_PER_PROCESS 2
 XBT_LOG_NEW_DEFAULT_CATEGORY(centralized, "my log messages");
 
-static int coordinator(int argc, char *argv[])
+static int coordinator(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
 {
   xbt_dynar_t requests = xbt_dynar_new(sizeof(char *), NULL);   // dynamic vector storing requests (which are char*)
   int CS_used = 0;              // initially the CS is idle
@@ -55,7 +55,7 @@ static int coordinator(int argc, char *argv[])
   return 0;
 }
 
-static int client(int argc, char *argv[])
+static int client(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
 {
   int my_pid = MSG_process_get_PID(MSG_process_self());
   // use my pid as name of mailbox to contact me
@@ -81,7 +81,7 @@ static int client(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
-  MSG_create_environment("../../platforms/small_platform.xml");
+  MSG_create_environment(argv[1]);
   MSG_function_register("coordinator", coordinator);
   MSG_function_register("client", client);
   MSG_launch_application("deploy_centralized_mutex.xml");