Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #256 from Flamefire/master
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 13 Mar 2018 19:19:16 +0000 (20:19 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Mar 2018 19:19:16 +0000 (20:19 +0100)
Modernize FindSimGrid

175 files changed:
.gitignore
.travis.yml
CMakeLists.txt
COPYING
ChangeLog
doc/Doxyfile.in
examples/s4u/CMakeLists.txt
examples/s4u/actor-kill-pid/s4u-actor-kill-pid.cpp [deleted file]
examples/s4u/actor-kill-pid/s4u-actor-kill-pid.tesh [deleted file]
examples/s4u/actor-kill/s4u-actor-kill.cpp
examples/s4u/actor-kill/s4u-actor-kill.tesh
examples/s4u/io-file-remote/s4u-io-file-remote.cpp
include/simgrid/forward.h
include/simgrid/host.h
include/simgrid/instr.h
include/simgrid/jedule/jedule.hpp
include/simgrid/jedule/jedule_events.hpp
include/simgrid/jedule/jedule_platform.hpp
include/simgrid/jedule/jedule_sd_binding.h
include/simgrid/kernel/future.hpp
include/simgrid/link.h
include/simgrid/modelchecker.h
include/simgrid/msg.h
include/simgrid/plugins/dvfs.h
include/simgrid/plugins/energy.h
include/simgrid/plugins/file_system.h
include/simgrid/plugins/live_migration.h
include/simgrid/plugins/load.h
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/ConditionVariable.hpp
include/simgrid/s4u/Engine.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/Mailbox.hpp
include/simgrid/s4u/Mutex.hpp
include/simgrid/s4u/NetZone.hpp
include/simgrid/s4u/Storage.hpp
include/simgrid/s4u/VirtualMachine.hpp
include/simgrid/s4u/forward.hpp
include/simgrid/simdag.h
include/simgrid/simix.h
include/simgrid/simix.hpp
include/simgrid/simix/blocking_simcall.hpp
include/simgrid_config.h.in
include/smpi/smpi.h
include/xbt/RngStream.h
include/xbt/asserts.h
include/xbt/automaton.h
include/xbt/backtrace.h
include/xbt/backtrace.hpp
include/xbt/base.h
include/xbt/config.h
include/xbt/config.hpp
include/xbt/cunit.h
include/xbt/dict.h
include/xbt/dynar.h
include/xbt/ex.h
include/xbt/ex.hpp
include/xbt/exception.hpp
include/xbt/graph.h
include/xbt/log.h
include/xbt/log.hpp
include/xbt/mallocator.h
include/xbt/misc.h
include/xbt/mmalloc.h
include/xbt/module.h
include/xbt/replay.hpp
include/xbt/str.h
include/xbt/string.hpp
include/xbt/synchro.h
include/xbt/sysdep.h
include/xbt/virtu.h
include/xbt/xbt_os_thread.h
include/xbt/xbt_os_time.h
src/bindings/java/jmsg_process.cpp
src/bindings/java/jmsg_process.h
src/bindings/java/org/simgrid/msg/Process.java
src/include/instr/instr_interface.h
src/include/mc/mc.h
src/include/simgrid/sg_config.h
src/include/surf/surf.hpp
src/instr/instr_config.cpp
src/instr/instr_private.hpp
src/instr/instr_smpi.hpp
src/kernel/EngineImpl.cpp
src/kernel/EngineImpl.hpp
src/kernel/activity/ActivityImpl.hpp
src/kernel/activity/CommImpl.hpp
src/kernel/activity/ExecImpl.hpp
src/kernel/activity/MutexImpl.cpp
src/kernel/activity/MutexImpl.hpp
src/kernel/activity/SleepImpl.hpp
src/kernel/activity/SynchroIo.hpp
src/kernel/activity/SynchroRaw.hpp
src/kernel/context/Context.hpp
src/kernel/lmm/maxmin.hpp
src/kernel/resource/Action.hpp
src/kernel/resource/Model.hpp
src/kernel/resource/Resource.hpp
src/kernel/routing/DragonflyZone.hpp
src/kernel/routing/NetPoint.cpp
src/kernel/routing/NetPoint.hpp
src/kernel/routing/NetZoneImpl.hpp
src/mc/checker/Checker.hpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/SafetyChecker.cpp
src/mc/mc_exit.hpp
src/mc/mc_ignore.h
src/mc/mc_replay.hpp
src/mc/mc_request.cpp
src/mc/remote/Client.hpp
src/msg/msg_global.cpp
src/msg/msg_private.hpp
src/msg/msg_process.cpp
src/plugins/file_system/FileSystem.hpp
src/plugins/vm/VirtualMachineImpl.hpp
src/s4u/s4u_actor.cpp
src/s4u/s4u_engine.cpp
src/s4u/s4u_storage.cpp
src/simdag/dax_dtd.h
src/simix/ActorImpl.cpp
src/simix/ActorImpl.hpp
src/simix/libsmx.cpp
src/simix/popping_accessors.hpp
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/popping_private.hpp
src/simix/simcalls.in
src/simix/smx_global.cpp
src/simix/smx_private.hpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/colls/smpi_mvapich2_selector_stampede.hpp
src/smpi/include/private.hpp
src/smpi/include/smpi_coll.hpp
src/smpi/include/smpi_utils.hpp
src/smpi/internals/instr_smpi.cpp
src/smpi/internals/smpi_bench.cpp
src/smpi/internals/smpi_dvfs.cpp
src/smpi/internals/smpi_process.cpp
src/smpi/internals/smpi_shared.cpp
src/smpi/mpi/smpi_f2c.cpp
src/smpi/mpi/smpi_request.cpp
src/surf/HostImpl.hpp
src/surf/StorageImpl.cpp
src/surf/StorageImpl.hpp
src/surf/cpu_interface.hpp
src/surf/cpu_ti.hpp
src/surf/ns3/ns3_simulator.hpp
src/surf/ptask_L07.hpp
src/surf/sg_platf.cpp
src/surf/storage_n11.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp
src/surf/surf_private.hpp
src/surf/trace_mgr.hpp
src/surf/xml/platf.hpp
src/surf/xml/platf_private.hpp
src/surf/xml/simgrid_dtd.h
src/xbt/automaton/automaton.c
src/xbt/config.cpp
src/xbt/dynar.cpp
src/xbt/ex.cpp
src/xbt/log_private.h
src/xbt/mmalloc/mmprivate.h
teshsuite/s4u/actor/actor.cpp
teshsuite/s4u/pid/pid.cpp
teshsuite/s4u/pid/pid.tesh
teshsuite/s4u/storage_client_server/storage_client_server.cpp
teshsuite/smpi/mpich3-test/perf/non_zero_root.c
teshsuite/smpi/mpich3-test/pt2pt/waitany-null.c
tools/cmake/GCCFlags.cmake
tools/cmake/MaintainerMode.cmake

index 5394388..9e66b05 100644 (file)
@@ -146,7 +146,6 @@ examples/msg/*.tr
 examples/s4u/actor-create/s4u-actor-create
 examples/s4u/actor-daemon/s4u-actor-daemon
 examples/s4u/actor-join/s4u-actor-join
-examples/s4u/actor-kill-pid/s4u-actor-kill-pid
 examples/s4u/actor-kill/s4u-actor-kill
 examples/s4u/actor-lifetime/s4u-actor-lifetime
 examples/s4u/actor-migration/s4u-actor-migration
index e1288a1..fcb08e6 100644 (file)
@@ -10,12 +10,7 @@ dist: trusty
 language: cpp
 compiler:
    - gcc
-#  - clang # boost 1.48 raises an error on clang:
-#            /usr/include/boost/signals2/detail/auto_buffer.hpp:565:57: error:
-#              reference to non-static member function must be called
-#                        std::uninitialized_fill( buffer_, buffer_ + size, init_value );
-#                                                                    ^~~~
-#
+#  - clang 
 addons:
   apt:
     packages:
@@ -52,7 +47,7 @@ script:
    - if [[ "$TRAVIS_OS_NAME" == "osx"   ]]; then cmake -Denable_model-checking=OFF -Denable_documentation=OFF -Denable_coverage=ON -Denable_java=ON -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=ON .; fi
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -Denable_model-checking=ON  -Denable_documentation=OFF -Denable_coverage=ON -Denable_java=ON -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .; fi
    # run make and ctest in the sonar wrapper on master/linux; run it directly in PR or OSX
-   - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then ./tools/internal/travis-sonarqube.sh make VERBOSE=1; else make VERBOSE=1 && ctest --output-on-failure --timeout 100; fi
+   - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then ./tools/internal/travis-sonarqube.sh make VERBOSE=1; else make VERBOSE=1 && ctest --output-on-failure ; fi
 notifications:
   recipients:
     - martin.quinson@ens-rennes.fr
index 51590bc..41f6c7a 100644 (file)
@@ -105,11 +105,11 @@ endif()
 #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
 
 set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "19")
-set(SIMGRID_VERSION_PATCH "0")
+set(SIMGRID_VERSION_MINOR "18")
+set(SIMGRID_VERSION_PATCH "90")
 set(SIMGRID_VERSION_EXTRA "-DEVEL") # Extra words to add to version string (e.g. -rc1)
 
-set(SIMGRID_VERSION_DATE  "2017") # Year for copyright information
+set(SIMGRID_VERSION_DATE  "2018") # Year for copyright information
 
 if(${SIMGRID_VERSION_PATCH} EQUAL "0")
   set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}")
diff --git a/COPYING b/COPYING
index f44d682..8c0db06 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -3,7 +3,7 @@ Upstream-Name: SimGrid
 Source: https://gforge.inria.fr/frs/?group_id=12
 
 Files: *
-Copyright: 2003-2016. The SimGrid Team. All rights reserved.
+Copyright: 2003-2018. The SimGrid Team. All rights reserved.
 License: LGPL-2.1
 
 Files: src/xbt/snprintf.c
@@ -11,35 +11,6 @@ Copyright: 1999, Mark Martinec <mark.martinec@ijs.si.
 License: Artistic
 Comment: Heavily adapted by the SimGrid team but remains under the original license
 
-Files: src/xbt/ex.cpp include/xbt/ex.h
-Copyright: 
-  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>
-  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>
-  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>
-  Copyright (c) 2005-2015. The SimGrid Team.  
-License: Expat
- This file is part of OSSP ex, an exception handling library
- which can be found at http://www.ossp.org/pkg/lib/ex/.
- .
- Permission to use, copy, modify, and distribute this software for
- any purpose with or without fee is hereby granted, provided that
- the above copyright notice and this permission notice appear in all
- copies.
- .
- THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-Comment: Adapted from code from Ralf S. Engelschall and others in the OSSP project, remains under the original license.
-
 Files: src/xbt/mmalloc/* include/xbt/mmalloc.h
 Copyright: 
   Copyright (C) 1991, 1992 Free Software Foundation, Inc.
index 827ae25..ba73427 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@ SimGrid (3.19) NOT RELEASED YET (target: March 20 2018, 16:15:27 UTC)
  MSG
  - Fix MSG_task_get_remaining_work_ratio() to return 1.0 for tasks that have
    not started.
+ - Remove parameter of MSG_process_killall().
+   Resetting the PID was bogus anyway (several actors could have the same PID).
 
  Documentation
  - Use a graphical TOC to make it easier to find the documentation you need
@@ -39,6 +41,9 @@ SimGrid (3.19) NOT RELEASED YET (target: March 20 2018, 16:15:27 UTC)
  TRACING
  - Remove unused run-time parameter "tracing/onelink-only".
 
+ Fixed bugs:
+ - #254: Something seems wrong with s4u::Actor::kill(aid_t)
+
 SimGrid (3.18) Released December 24 2017
 
  The "Ho Ho Ho! SimGrid 4 beta is coming to town" release.
index c40b913..9a93fc7 100644 (file)
@@ -1453,11 +1453,10 @@ INCLUDE_FILE_PATTERNS  =
 # undefined via #undef or recursively expanded use the := operator
 # instead of the = operator.
 
-PREDEFINED             = XBT_PUBLIC(type)="extern type" \
-                         XBT_EXPORT_NO_IMPORT(type)=type \
-                         XBT_IMPORT_NO_EXPORT(type)=type \
-                         XBT_PUBLIC_DATA(type)="extern type" \
-                         XBT_PUBLIC_CLASS=class \
+PREDEFINED             = XBT_PUBLIC= \
+                         XBT_EXPORT_NO_IMPORT= \
+                         XBT_IMPORT_NO_EXPORT= \
+                         XBT_PUBLIC_DATA=extern \
                          XBT_INLINE= \
                         XBT_PRIVATE=
 
index 8782111..64eb278 100644 (file)
@@ -1,4 +1,4 @@
-foreach (example actor-create actor-daemon actor-join actor-kill actor-kill-pid
+foreach (example actor-create actor-daemon actor-join actor-kill
                  actor-lifetime actor-migration actor-suspend actor-yield
                  app-chainsend app-masterworker app-pingpong app-token-ring
                  async-wait async-waitany async-waitall
@@ -85,7 +85,7 @@ set(txt_files     ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-re
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage.txt
                                   ${CMAKE_CURRENT_SOURCE_DIR}/README.doc                                   PARENT_SCOPE)
 
-foreach(example actor-create actor-daemon actor-join actor-kill actor-kill-pid
+foreach(example actor-create actor-daemon actor-join actor-kill
                 actor-lifetime actor-migration actor-suspend actor-yield
                 app-bittorrent app-chainsend app-masterworker app-pingpong app-token-ring 
                 async-wait async-waitall async-waitany
diff --git a/examples/s4u/actor-kill-pid/s4u-actor-kill-pid.cpp b/examples/s4u/actor-kill-pid/s4u-actor-kill-pid.cpp
deleted file mode 100644 (file)
index 3f1c42d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (c) 2017-2018 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/s4u.hpp>
-
-XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_kill_pid, "Messages specific for this s4u example");
-
-static int on_exit(void*, void*)
-{
-  XBT_INFO("I have been killed!");
-  return 0;
-}
-
-static void victimA_fun()
-{
-  simgrid::s4u::this_actor::onExit(on_exit, nullptr);
-  XBT_INFO("Hello!");
-  XBT_INFO("Suspending myself");
-  simgrid::s4u::this_actor::suspend(); /* - Start by suspending itself */
-  XBT_INFO("OK, OK. Let's work");      /* - Then is resumed and start to execute a task */
-  simgrid::s4u::this_actor::execute(1e9);
-  XBT_INFO("Bye!"); /* - But will never reach the end of it */
-}
-
-static void victimB_fun()
-{
-  XBT_INFO("Terminate before being killed");
-}
-
-static void killer()
-{
-  XBT_INFO("Hello!"); /* - First start a victim process */
-  simgrid::s4u::ActorPtr victimA =
-      simgrid::s4u::Actor::createActor("victim A", simgrid::s4u::Host::by_name("Fafard"), victimA_fun);
-  simgrid::s4u::ActorPtr victimB =
-      simgrid::s4u::Actor::createActor("victim B", simgrid::s4u::Host::by_name("Jupiter"), victimB_fun);
-  simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
-
-  XBT_INFO("Resume the victim A"); /* - Resume it from its suspended state */
-  victimA->resume();
-  simgrid::s4u::this_actor::sleep_for(2);
-
-  aid_t pidA = victimA->getPid();
-  XBT_INFO("Kill the victim A (pid=%lu)", pidA); /* - and then kill it */
-  simgrid::s4u::Actor::kill(pidA);
-
-  aid_t pidB = victimB->getPid();
-  XBT_INFO("Kill victimB (pid=%lu), even if it's already dead", pidB); /* that's a no-op, there is no zombies in SimGrid */
-  try
-  {
-    simgrid::s4u::Actor::kill(pidB);
-  } catch (const std::runtime_error& e) {
-    XBT_DEBUG("Caught exception: %s", e.what());
-  }
-  simgrid::s4u::this_actor::sleep_for(1);
-
-  XBT_INFO("Killing everybody but myself");
-  simgrid::s4u::Actor::killAll();
-
-  aid_t pidMe = simgrid::s4u::this_actor::getPid();
-  XBT_INFO("OK, goodbye now. I commit a suicide (pid=%lu).", pidMe);
-  simgrid::s4u::Actor::kill(pidMe);
-
-  XBT_INFO("This line will never get displayed: I'm already dead since the previous line.");
-}
-
-int main(int argc, char* argv[])
-{
-  simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
-
-  e.loadPlatform(argv[1]); /* - Load the platform description */
-  /* - Create and deploy killer process, that will create the victim actors  */
-  simgrid::s4u::Actor::createActor("killer", simgrid::s4u::Host::by_name("Tremblay"), killer);
-
-  e.run(); /* - Run the simulation */
-
-  XBT_INFO("Simulation time %g", e.getClock());
-
-  return 0;
-}
diff --git a/examples/s4u/actor-kill-pid/s4u-actor-kill-pid.tesh b/examples/s4u/actor-kill-pid/s4u-actor-kill-pid.tesh
deleted file mode 100644 (file)
index e6171fc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env tesh
-
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-actor-kill-pid ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
->[  0.000000] (killer@Tremblay) Hello!
->[  0.000000] (victim A@Fafard) Hello!
->[  0.000000] (victim A@Fafard) Suspending myself
->[  0.000000] (victim B@Jupiter) Terminate before being killed
->[ 10.000000] (killer@Tremblay) Resume the victim A
->[ 10.000000] (victim A@Fafard) OK, OK. Let's work
->[ 12.000000] (killer@Tremblay) Kill the victim A (pid=2)
->[ 12.000000] (killer@Tremblay) Kill victimB (pid=3), even if it's already dead
->[ 13.000000] (killer@Tremblay) Killing everybody but myself
->[ 13.000000] (victim A@Fafard) I have been killed!
->[ 13.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide (pid=1).
->[ 13.000000] (maestro@) Simulation time 13
index 78658b9..3663640 100644 (file)
@@ -43,10 +43,13 @@ static void killer()
   simgrid::s4u::this_actor::sleep_for(2);
 
   XBT_INFO("Kill the victim A"); /* - and then kill it */
-  victimA->kill();
+  simgrid::s4u::Actor::kill(victimA->getPid()); // Kill by PID is legit
+
+  simgrid::s4u::this_actor::sleep_for(1);
 
   XBT_INFO("Kill victimB, even if it's already dead"); /* that's a no-op, there is no zombies in SimGrid */
-  victimB->kill();
+  victimB->kill(); // the actor is automatically garbage-collected after this last reference
+
   simgrid::s4u::this_actor::sleep_for(1);
 
   XBT_INFO("Killing everybody but myself");
index 2e31458..eca4cd3 100644 (file)
@@ -9,7 +9,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-actor-kill ${platfdir}/small_platform.xml "--l
 > [ 10.000000] (victim A@Fafard) OK, OK. Let's work
 > [ 12.000000] (killer@Tremblay) Kill the victim A
 > [ 12.000000] (victim A@Fafard) I have been killed!
-> [ 12.000000] (killer@Tremblay) Kill victimB, even if it's already dead
-> [ 13.000000] (killer@Tremblay) Killing everybody but myself
-> [ 13.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide.
-> [ 13.000000] (maestro@) Simulation time 13
+> [ 13.000000] (killer@Tremblay) Kill victimB, even if it's already dead
+> [ 14.000000] (killer@Tremblay) Killing everybody but myself
+> [ 14.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide.
+> [ 14.000000] (maestro@) Simulation time 14
index f93c062..1724054 100644 (file)
@@ -54,19 +54,18 @@ int main(int argc, char** argv)
   e.loadPlatform(argv[1]);
   e.registerFunction("host", host);
   e.loadDeployment(argv[2]);
-  std::map<std::string, simgrid::s4u::Storage*> allStorages;
-  simgrid::s4u::getStorageList(&allStorages);
+  std::vector<simgrid::s4u::Storage*> allStorages = e.getAllStorages();
 
   for (auto const& s : allStorages) {
-    XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s.second) / INMEGA,
-             sg_storage_get_size_free(s.second) / INMEGA, s.second->getCname());
+    XBT_INFO("Init: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s) / INMEGA,
+             sg_storage_get_size_free(s) / INMEGA, s->getCname());
   }
 
   e.run();
 
   for (auto const& s : allStorages) {
-    XBT_INFO("End: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s.second) / INMEGA,
-             sg_storage_get_size_free(s.second) / INMEGA, s.second->getCname());
+    XBT_INFO("End: %llu/%llu MiB used/free on '%s'", sg_storage_get_size_used(s) / INMEGA,
+             sg_storage_get_size_free(s) / INMEGA, s->getCname());
   }
 
   XBT_INFO("Simulation time %g", simgrid::s4u::Engine::getClock());
index 772a50a..170910d 100644 (file)
@@ -22,8 +22,8 @@ class ContextFactory;
 namespace activity {
   class ActivityImpl;
   using ActivityImplPtr = boost::intrusive_ptr<ActivityImpl>;
-  XBT_PUBLIC(void) intrusive_ptr_add_ref(ActivityImpl* activity);
-  XBT_PUBLIC(void) intrusive_ptr_release(ActivityImpl* activity);
+  XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
+  XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
 
   class CommImpl;
   using CommImplPtr = boost::intrusive_ptr<CommImpl>;
@@ -152,6 +152,6 @@ typedef unsigned long long sg_size_t;
  */
 typedef long long sg_offset_t;
 
-typedef unsigned long aid_t;
+typedef long aid_t;
 
 #endif /* SIMGRID_TYPES_H */
index 60696b6..109540c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2016. The SimGrid Team.
+/* Copyright (c) 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(sg_host_t *) sg_host_list();
+XBT_PUBLIC sg_host_t* sg_host_list();
 
 /** \ingroup m_host_management
  * \brief Return the current number MSG hosts.
  */
-XBT_PUBLIC(size_t) sg_host_count();
+XBT_PUBLIC size_t sg_host_count();
 #define MSG_get_host_number() sg_host_count()
 
 /** \ingroup m_host_management
@@ -29,11 +29,11 @@ XBT_PUBLIC(size_t) sg_host_count();
  * \remark The host order in the returned array is generally different from the host creation/declaration order in the
  *         XML platform (we use a hash table internally)
  */
-XBT_PUBLIC(xbt_dynar_t) sg_hosts_as_dynar();
+XBT_PUBLIC xbt_dynar_t sg_hosts_as_dynar();
 #define MSG_hosts_as_dynar() sg_hosts_as_dynar()
 
-XBT_PUBLIC(size_t) sg_host_extension_create(void(*deleter)(void*));
-XBT_PUBLIC(void*) sg_host_extension_get(sg_host_t host, size_t rank);
+XBT_PUBLIC size_t sg_host_extension_create(void (*deleter)(void*));
+XBT_PUBLIC void* sg_host_extension_get(sg_host_t host, size_t rank);
 
 /** \ingroup m_host_management
  * \brief Finds a msg_host_t using its name.
@@ -42,14 +42,14 @@ XBT_PUBLIC(void*) sg_host_extension_get(sg_host_t host, size_t rank);
  * \param name the name of an host.
  * \return the corresponding host
  */
-XBT_PUBLIC(sg_host_t) sg_host_by_name(const char *name);
+XBT_PUBLIC sg_host_t sg_host_by_name(const char* name);
 #define MSG_host_by_name(name) sg_host_by_name(name)
 #define MSG_get_host_by_name(n) sg_host_by_name(n) /* Rewrite the old name into the new one transparently */
 
 /** \ingroup m_host_management
  *
  * \brief Return the name of the #msg_host_t. */
-XBT_PUBLIC(const char*) sg_host_get_name(sg_host_t host);
+XBT_PUBLIC const char* sg_host_get_name(sg_host_t host);
 #define MSG_host_get_name(host) sg_host_get_name(host)
 
 // ========== User Data ==============
@@ -59,7 +59,7 @@ XBT_PUBLIC(const char*) sg_host_get_name(sg_host_t host);
  *
  * This functions returns the user data associated to \a host if it is possible.
  */
-XBT_PUBLIC(void*) sg_host_user(sg_host_t host);
+XBT_PUBLIC void* sg_host_user(sg_host_t host);
 #define MSG_host_get_data(host) sg_host_user(host)
 /** \ingroup m_host_management
  *
@@ -67,9 +67,9 @@ XBT_PUBLIC(void*) sg_host_user(sg_host_t host);
  *
  * This functions attach \a data to \a host if it is possible.
  */
-XBT_PUBLIC(void) sg_host_user_set(sg_host_t host, void* userdata);
+XBT_PUBLIC void sg_host_user_set(sg_host_t host, void* userdata);
 #define MSG_host_set_data(host, data) sg_host_user_set(host, data)
-XBT_PUBLIC(void) sg_host_user_destroy(sg_host_t host);
+XBT_PUBLIC void sg_host_user_destroy(sg_host_t host);
 
 // ========= storage related functions ============
 /** \ingroup m_host_management
@@ -77,7 +77,7 @@ XBT_PUBLIC(void) sg_host_user_destroy(sg_host_t host);
  * \param host a host
  * \return a dict containing all mount point on the host (mount_name => msg_storage_t)
  */
-XBT_PUBLIC(xbt_dict_t) sg_host_get_mounted_storage_list(sg_host_t host);
+XBT_PUBLIC xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host);
 #define MSG_host_get_mounted_storage_list(host) sg_host_get_mounted_storage_list(host)
 
 /** \ingroup m_host_management
@@ -85,18 +85,18 @@ XBT_PUBLIC(xbt_dict_t) sg_host_get_mounted_storage_list(sg_host_t host);
  * \param host a host
  * \return a dynar containing all storages (name) attached to the host
  */
-XBT_PUBLIC(xbt_dynar_t) sg_host_get_attached_storage_list(sg_host_t host);
+XBT_PUBLIC xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host);
 #define MSG_host_get_attached_storage_list(host) host_get_attached_storage_list(host)
 
 // =========== user-level functions ===============
 /** \ingroup m_host_management
  * \brief Return the speed of the processor (in flop/s), regardless of the current load on the machine.
  */
-XBT_PUBLIC(double) sg_host_speed(sg_host_t host);
+XBT_PUBLIC double sg_host_speed(sg_host_t host);
 #define MSG_host_get_speed(host) sg_host_speed(host)
-XBT_PUBLIC(double) sg_host_get_available_speed(sg_host_t host);
+XBT_PUBLIC double sg_host_get_available_speed(sg_host_t host);
 
-XBT_PUBLIC(int) sg_host_core_count(sg_host_t host);
+XBT_PUBLIC int sg_host_core_count(sg_host_t host);
 #define MSG_host_get_core_number(host) sg_host_core_count(host)
 
 /** \ingroup m_process_management
@@ -104,31 +104,31 @@ XBT_PUBLIC(int) sg_host_core_count(sg_host_t host);
  * \param process a process (nullptr means the current one)
  * \return the msg_host_t corresponding to the location on which \a process is running.
  */
-XBT_PUBLIC(sg_host_t) sg_host_self();
+XBT_PUBLIC sg_host_t sg_host_self();
 #define MSG_host_self() sg_host_self()
 
-XBT_PUBLIC(const char*) sg_host_self_get_name();
+XBT_PUBLIC const char* sg_host_self_get_name();
 
 /** \ingroup m_host_management
  * \brief Return the total count of pstates defined for a host. See also @ref plugin_energy.
  *
  * \param  host host to test
  */
-XBT_PUBLIC(int) sg_host_get_nb_pstates(sg_host_t host);
+XBT_PUBLIC int sg_host_get_nb_pstates(sg_host_t host);
 #define MSG_host_get_nb_pstates(host) sg_host_get_nb_pstates(host)
 
-XBT_PUBLIC(int) sg_host_get_pstate(sg_host_t host);
+XBT_PUBLIC int sg_host_get_pstate(sg_host_t host);
 #define MSG_host_get_pstate(h) sg_host_get_pstate(h) /* users don't know that MSG is the C version of SimGrid */
-XBT_PUBLIC(void) sg_host_set_pstate(sg_host_t host,int pstate);
+XBT_PUBLIC void sg_host_set_pstate(sg_host_t host, int pstate);
 #define MSG_host_set_pstate(h, pstate) sg_host_set_pstate(h, pstate) /* (same here) */
 
-XBT_PUBLIC(void) sg_host_turn_on(sg_host_t host);
+XBT_PUBLIC void sg_host_turn_on(sg_host_t host);
 #define MSG_host_on(h) sg_host_turn_on(h)
-XBT_PUBLIC(void) sg_host_turn_off(sg_host_t host);
+XBT_PUBLIC void sg_host_turn_off(sg_host_t host);
 #define MSG_host_off(h) sg_host_turn_off(h)
-XBT_PUBLIC(int) sg_host_is_on(sg_host_t host);
+XBT_PUBLIC int sg_host_is_on(sg_host_t host);
 #define MSG_host_is_on(h) sg_host_is_on(h)
-XBT_PUBLIC(int) sg_host_is_off(sg_host_t host);
+XBT_PUBLIC int sg_host_is_off(sg_host_t host);
 #define MSG_host_is_off(h) sg_host_is_off(h)
 
 /** \ingroup m_host_management
@@ -137,7 +137,7 @@ XBT_PUBLIC(int) sg_host_is_off(sg_host_t host);
  * \param host a host
  * \return a dict containing the properties
  */
-XBT_PUBLIC(xbt_dict_t) sg_host_get_properties(sg_host_t host);
+XBT_PUBLIC xbt_dict_t sg_host_get_properties(sg_host_t host);
 #define MSG_host_get_properties(host) sg_host_get_properties(host)
 
 /** \ingroup m_host_management
@@ -147,7 +147,7 @@ XBT_PUBLIC(xbt_dict_t) sg_host_get_properties(sg_host_t host);
  * \param name a property name
  * \return value of a property (or nullptr if property not set)
  */
-XBT_PUBLIC(const char*) sg_host_get_property_value(sg_host_t host, const char* name);
+XBT_PUBLIC const char* sg_host_get_property_value(sg_host_t host, const char* name);
 #define MSG_host_get_property_value(host, name) sg_host_get_property_value(host, name)
 
 /** \ingroup m_host_management
@@ -157,13 +157,13 @@ XBT_PUBLIC(const char*) sg_host_get_property_value(sg_host_t host, const char* n
  * \param name a property name
  * \param value what to change the property to
  */
-XBT_PUBLIC(void) sg_host_set_property_value(sg_host_t host, const char* name, const char* value);
+XBT_PUBLIC void sg_host_set_property_value(sg_host_t host, const char* name, const char* value);
 #define MSG_host_set_property_value(host, name, value) sg_host_set_property_value(host, name, value)
 
-XBT_PUBLIC(void) sg_host_route(sg_host_t from, sg_host_t to, xbt_dynar_t links);
-XBT_PUBLIC(double) sg_host_route_latency(sg_host_t from, sg_host_t to);
-XBT_PUBLIC(double) sg_host_route_bandwidth(sg_host_t from, sg_host_t to);
-XBT_PUBLIC(void) sg_host_dump(sg_host_t ws);
+XBT_PUBLIC void sg_host_route(sg_host_t from, sg_host_t to, xbt_dynar_t links);
+XBT_PUBLIC double sg_host_route_latency(sg_host_t from, sg_host_t to);
+XBT_PUBLIC double sg_host_route_bandwidth(sg_host_t from, sg_host_t to);
+XBT_PUBLIC void sg_host_dump(sg_host_t ws);
 SG_END_DECL()
 
 #endif /* SIMGRID_HOST_H_ */
index 80cb735..d36c6ce 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 SG_BEGIN_DECL()
 
 /* Functions to manage tracing categories */
-XBT_PUBLIC(void) TRACE_category(const char *category);
-XBT_PUBLIC(void) TRACE_category_with_color (const char *category, const char *color);
-XBT_PUBLIC(xbt_dynar_t) TRACE_get_categories ();
-XBT_PUBLIC(void) TRACE_smpi_set_category(const char *category);
+XBT_PUBLIC void TRACE_category(const char* category);
+XBT_PUBLIC void TRACE_category_with_color(const char* category, const char* color);
+XBT_PUBLIC xbt_dynar_t TRACE_get_categories();
+XBT_PUBLIC void TRACE_smpi_set_category(const char* category);
 
 /*  Functions to manage tracing marks (used for trace comparison experiments) */
-XBT_PUBLIC(void) TRACE_declare_mark(const char *mark_type);
-XBT_PUBLIC(void) TRACE_declare_mark_value_with_color (const char *mark_type, const char *mark_value, const char *mark_color);
-XBT_PUBLIC(void) TRACE_declare_mark_value (const char *mark_type, const char *mark_value);
-XBT_PUBLIC(void) TRACE_mark(const char *mark_type, const char *mark_value);
-XBT_PUBLIC(xbt_dynar_t) TRACE_get_marks ();
+XBT_PUBLIC void TRACE_declare_mark(const char* mark_type);
+XBT_PUBLIC void TRACE_declare_mark_value_with_color(const char* mark_type, const char* mark_value,
+                                                    const char* mark_color);
+XBT_PUBLIC void TRACE_declare_mark_value(const char* mark_type, const char* mark_value);
+XBT_PUBLIC void TRACE_mark(const char* mark_type, const char* mark_value);
+XBT_PUBLIC xbt_dynar_t TRACE_get_marks();
 
 /* Function used by graphicator (transform a SimGrid platform file in a graphviz dot file with the network topology) */
-XBT_PUBLIC(int) TRACE_platform_graph_export_graphviz (const char *filename);
+XBT_PUBLIC int TRACE_platform_graph_export_graphviz(const char* filename);
 
 /* User-variables related functions*/
 /* for VM variables */
-XBT_PUBLIC(void) TRACE_vm_variable_declare (const char *variable);
-XBT_PUBLIC(void) TRACE_vm_variable_declare_with_color (const char *variable, const char *color);
-XBT_PUBLIC(void) TRACE_vm_variable_set (const char *vm, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_vm_variable_add (const char *vm, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_vm_variable_sub (const char *vm, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_vm_variable_set_with_time (double time, const char *vm, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_vm_variable_add_with_time (double time, const char *vm, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_vm_variable_sub_with_time (double time, const char *vm, const char *variable, double value);
+XBT_PUBLIC void TRACE_vm_variable_declare(const char* variable);
+XBT_PUBLIC void TRACE_vm_variable_declare_with_color(const char* variable, const char* color);
+XBT_PUBLIC void TRACE_vm_variable_set(const char* vm, const char* variable, double value);
+XBT_PUBLIC void TRACE_vm_variable_add(const char* vm, const char* variable, double value);
+XBT_PUBLIC void TRACE_vm_variable_sub(const char* vm, const char* variable, double value);
+XBT_PUBLIC void TRACE_vm_variable_set_with_time(double time, const char* vm, const char* variable, double value);
+XBT_PUBLIC void TRACE_vm_variable_add_with_time(double time, const char* vm, const char* variable, double value);
+XBT_PUBLIC void TRACE_vm_variable_sub_with_time(double time, const char* vm, const char* variable, double value);
 
 /* for host variables */
-XBT_PUBLIC(void) TRACE_host_variable_declare (const char *variable);
-XBT_PUBLIC(void) TRACE_host_variable_declare_with_color (const char *variable, const char *color);
-XBT_PUBLIC(void) TRACE_host_variable_set (const char *host, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_host_variable_add (const char *host, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_host_variable_sub (const char *host, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_host_variable_set_with_time (double time, const char *host, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_host_variable_add_with_time (double time, const char *host, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_host_variable_sub_with_time (double time, const char *host, const char *variable, double value);
-XBT_PUBLIC(xbt_dynar_t) TRACE_get_host_variables ();
+XBT_PUBLIC void TRACE_host_variable_declare(const char* variable);
+XBT_PUBLIC void TRACE_host_variable_declare_with_color(const char* variable, const char* color);
+XBT_PUBLIC void TRACE_host_variable_set(const char* host, const char* variable, double value);
+XBT_PUBLIC void TRACE_host_variable_add(const char* host, const char* variable, double value);
+XBT_PUBLIC void TRACE_host_variable_sub(const char* host, const char* variable, double value);
+XBT_PUBLIC void TRACE_host_variable_set_with_time(double time, const char* host, const char* variable, double value);
+XBT_PUBLIC void TRACE_host_variable_add_with_time(double time, const char* host, const char* variable, double value);
+XBT_PUBLIC void TRACE_host_variable_sub_with_time(double time, const char* host, const char* variable, double value);
+XBT_PUBLIC xbt_dynar_t TRACE_get_host_variables();
 
 /* for link variables */
-XBT_PUBLIC(void) TRACE_link_variable_declare (const char *var);
-XBT_PUBLIC(void) TRACE_link_variable_declare_with_color (const char *var, const char *color);
-XBT_PUBLIC(void) TRACE_link_variable_set (const char *link, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_variable_add (const char *link, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_variable_sub (const char *link, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_variable_set_with_time (double time, const char *link, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_variable_add_with_time (double time, const char *link, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_variable_sub_with_time (double time, const char *link, const char *variable, double value);
+XBT_PUBLIC void TRACE_link_variable_declare(const char* var);
+XBT_PUBLIC void TRACE_link_variable_declare_with_color(const char* var, const char* color);
+XBT_PUBLIC void TRACE_link_variable_set(const char* link, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_variable_add(const char* link, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_variable_sub(const char* link, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_variable_set_with_time(double time, const char* link, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_variable_add_with_time(double time, const char* link, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_variable_sub_with_time(double time, const char* link, const char* variable, double value);
 
 /* for link variables, but with src and dst used for get_route */
-XBT_PUBLIC(void) TRACE_link_srcdst_variable_set (const char *src, const char *dst, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_srcdst_variable_add (const char *src, const char *dst, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_srcdst_variable_sub (const char *src, const char *dst, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_srcdst_variable_set_with_time (double time, const char *src, const char *dst, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_srcdst_variable_add_with_time (double time, const char *src, const char *dst, const char *variable, double value);
-XBT_PUBLIC(void) TRACE_link_srcdst_variable_sub_with_time (double time, const char *src, const char *dst, const char *variable, double value);
-XBT_PUBLIC(xbt_dynar_t) TRACE_get_link_variables ();
-XBT_PUBLIC(void) TRACE_host_state_declare (const char *state);
-XBT_PUBLIC(void) TRACE_host_state_declare_value (const char *state, const char *value, const char *color);
-XBT_PUBLIC(void) TRACE_host_set_state (const char *host, const char *state, const char *value);
-XBT_PUBLIC(void) TRACE_host_push_state (const char *host, const char *state, const char *value);
-XBT_PUBLIC(void) TRACE_host_pop_state (const char *host, const char *state);
+XBT_PUBLIC void TRACE_link_srcdst_variable_set(const char* src, const char* dst, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_srcdst_variable_add(const char* src, const char* dst, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_srcdst_variable_sub(const char* src, const char* dst, const char* variable, double value);
+XBT_PUBLIC void TRACE_link_srcdst_variable_set_with_time(double time, const char* src, const char* dst,
+                                                         const char* variable, double value);
+XBT_PUBLIC void TRACE_link_srcdst_variable_add_with_time(double time, const char* src, const char* dst,
+                                                         const char* variable, double value);
+XBT_PUBLIC void TRACE_link_srcdst_variable_sub_with_time(double time, const char* src, const char* dst,
+                                                         const char* variable, double value);
+XBT_PUBLIC xbt_dynar_t TRACE_get_link_variables();
+XBT_PUBLIC void TRACE_host_state_declare(const char* state);
+XBT_PUBLIC void TRACE_host_state_declare_value(const char* state, const char* value, const char* color);
+XBT_PUBLIC void TRACE_host_set_state(const char* host, const char* state, const char* value);
+XBT_PUBLIC void TRACE_host_push_state(const char* host, const char* state, const char* value);
+XBT_PUBLIC void TRACE_host_pop_state(const char* host, const char* state);
 
 /* for creating graph configuration files for Viva by hand */
-XBT_PUBLIC(xbt_dynar_t) TRACE_get_node_types ();
-XBT_PUBLIC(xbt_dynar_t) TRACE_get_edge_types ();
+XBT_PUBLIC xbt_dynar_t TRACE_get_node_types();
+XBT_PUBLIC xbt_dynar_t TRACE_get_edge_types();
 
 SG_END_DECL()
 
index eb25b52..6a19881 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -17,8 +17,7 @@
 namespace simgrid {
 namespace jedule{
 
-
-XBT_PUBLIC_CLASS Jedule {
+class XBT_PUBLIC Jedule {
 public:
   Jedule()=default;
   ~Jedule();
index 704d4f6..6f57c01 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 namespace simgrid {
 namespace jedule{
 
-XBT_PUBLIC_CLASS Event{
-  public:
-    Event(std::string name, double start_time, double end_time, std::string type);
-    ~Event();
-    void addCharacteristic(char *characteristic);
-    void addResources(std::vector<sg_host_t> *host_selection);
-    void addInfo(char *key, char *value);
-    void print(FILE *file);
-
-  private:
-    std::string name;
-    double start_time;
-    double end_time;
-    std::string type;
-    std::vector<jed_subset_t> *resource_subsets;
-    std::vector<char*> characteristics_list; /* just a list of names (strings) */
-    std::unordered_map<char*, char*> info_map;     /* key/value pairs */
+class XBT_PUBLIC Event {
+public:
+  Event(std::string name, double start_time, double end_time, std::string type);
+  ~Event();
+  void addCharacteristic(char* characteristic);
+  void addResources(std::vector<sg_host_t>* host_selection);
+  void addInfo(char* key, char* value);
+  void print(FILE* file);
+
+private:
+  std::string name;
+  double start_time;
+  double end_time;
+  std::string type;
+  std::vector<jed_subset_t>* resource_subsets;
+  std::vector<char*> characteristics_list;   /* just a list of names (strings) */
+  std::unordered_map<char*, char*> info_map; /* key/value pairs */
 };
 }
 }
 
 extern "C" {
-typedef simgrid::jedule::Event * jed_event_t;
+typedef simgrid::jedule::Event* jed_event_t;
 }
 
 #endif
index 9510ad0..d7a7b4c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -17,7 +17,7 @@
 
 namespace simgrid {
 namespace jedule{
-XBT_PUBLIC_CLASS Container {
+class XBT_PUBLIC Container {
 public:
   Container(std::string name);
   virtual ~Container();
@@ -39,7 +39,7 @@ public:
   void printResources(FILE *file);
 };
 
-XBT_PUBLIC_CLASS Subset {
+class XBT_PUBLIC Subset {
 public:
   Subset(int s, int n, Container* p);
   virtual ~Subset()=default;
index 909ad6c..969cdfd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, 2013-2015. The SimGrid Team.
+/* Copyright (c) 2010-2011, 2013-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 #if SIMGRID_HAVE_JEDULE
 SG_BEGIN_DECL()
-XBT_PUBLIC(void) jedule_log_sd_event(SD_task_t task);
-XBT_PUBLIC(void) jedule_sd_init(void);
-XBT_PUBLIC(void) jedule_sd_exit(void);
-XBT_PUBLIC(void) jedule_sd_dump(const char* filename);
+XBT_PUBLIC void jedule_log_sd_event(SD_task_t task);
+XBT_PUBLIC void jedule_sd_init(void);
+XBT_PUBLIC void jedule_sd_exit(void);
+XBT_PUBLIC void jedule_sd_dump(const char* filename);
 SG_END_DECL()
 #endif /* JEDULE_SD_BINDING_H_ */
 
index 7ecfaca..f0c8cac 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team.
+/* Copyright (c) 2016-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@ public:
   FutureStateBase(FutureStateBase const&) = delete;
   FutureStateBase& operator=(FutureStateBase const&) = delete;
 
-  XBT_PUBLIC(void) schedule(simgrid::xbt::Task<void()>&& job);
+  XBT_PUBLIC void schedule(simgrid::xbt::Task<void()>&& job);
 
   void set_exception(std::exception_ptr exception)
   {
index 9dea554..e3c465d 100644 (file)
@@ -1,6 +1,6 @@
 /* Public interface to the Link datatype                                    */
 
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 /* C interface */
 SG_BEGIN_DECL()
-XBT_PUBLIC(const char*) sg_link_name(sg_link_t link);
-XBT_PUBLIC(sg_link_t) sg_link_by_name(const char* name);
-XBT_PUBLIC(int) sg_link_is_shared(sg_link_t link);
-XBT_PUBLIC(double) sg_link_bandwidth(sg_link_t link);
-XBT_PUBLIC(double) sg_link_latency(sg_link_t link);
-XBT_PUBLIC(void*) sg_link_data(sg_link_t link);
-XBT_PUBLIC(void) sg_link_data_set(sg_link_t link, void* data);
-XBT_PUBLIC(int) sg_link_count();
-XBT_PUBLIC(sg_link_t*) sg_link_list();
-XBT_PUBLIC(void) sg_link_exit();
+XBT_PUBLIC const char* sg_link_name(sg_link_t link);
+XBT_PUBLIC sg_link_t sg_link_by_name(const char* name);
+XBT_PUBLIC int sg_link_is_shared(sg_link_t link);
+XBT_PUBLIC double sg_link_bandwidth(sg_link_t link);
+XBT_PUBLIC double sg_link_latency(sg_link_t link);
+XBT_PUBLIC void* sg_link_data(sg_link_t link);
+XBT_PUBLIC void sg_link_data_set(sg_link_t link, void* data);
+XBT_PUBLIC int sg_link_count();
+XBT_PUBLIC sg_link_t* sg_link_list();
+XBT_PUBLIC void sg_link_exit();
 SG_END_DECL()
 
 #endif /* INCLUDE_SIMGRID_LINK_H_ */
index 5ccaed2..547f9fd 100644 (file)
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(int) MC_random(int min, int max);
+XBT_PUBLIC int MC_random(int min, int max);
 
 #if SIMGRID_HAVE_MC
 
 /* Internal variable used to check if we're running under the MC
  *
  * Please don't use directly: you should use MC_is_active. */
-extern XBT_PUBLIC(int) _sg_do_model_check;
-extern XBT_PUBLIC(int) _sg_mc_max_visited_states;
+extern XBT_PUBLIC int _sg_do_model_check;
+extern XBT_PUBLIC int _sg_mc_max_visited_states;
 
 #define MC_is_active()                  _sg_do_model_check
 #define MC_visited_reduction() _sg_mc_max_visited_states
@@ -39,17 +39,17 @@ extern XBT_PUBLIC(int) _sg_mc_max_visited_states;
  *
  *  This function is used to define safety properties to verify.
  */
-XBT_PUBLIC(void) MC_assert(int);
+XBT_PUBLIC void MC_assert(int);
 
-XBT_PUBLIC(void) MC_automaton_new_propositional_symbol(const char* id, int(*fct)(void));
-XBT_PUBLIC(void) MC_automaton_new_propositional_symbol_pointer(const char *id, int* value);
+XBT_PUBLIC void MC_automaton_new_propositional_symbol(const char* id, int (*fct)(void));
+XBT_PUBLIC void MC_automaton_new_propositional_symbol_pointer(const char* id, int* value);
 
-XBT_PUBLIC(void) MC_cut(void);
-XBT_PUBLIC(void) MC_ignore(void *addr, size_t size);
+XBT_PUBLIC void MC_cut(void);
+XBT_PUBLIC void MC_ignore(void* addr, size_t size);
 
-XBT_PUBLIC(void) MC_ignore_heap(void* address, size_t size);
-XBT_PUBLIC(void) MC_unignore_heap(void* address, size_t size);
-XBT_PUBLIC(void) MC_ignore_global_variable(const char* var_name);
+XBT_PUBLIC void MC_ignore_heap(void* address, size_t size);
+XBT_PUBLIC void MC_unignore_heap(void* address, size_t size);
+XBT_PUBLIC void MC_ignore_global_variable(const char* var_name);
 
 #else
 
index b885231..387efa6 100644 (file)
@@ -47,8 +47,7 @@ typedef s4u_NetZone* msg_netzone_t;
  */
 typedef sg_host_t msg_host_t;
 
-
-XBT_PUBLIC_DATA(int) sg_storage_max_file_descriptors;
+XBT_PUBLIC_DATA int sg_storage_max_file_descriptors;
 /* ******************************** Task ************************************ */
 
 typedef struct s_simdata_task_t* simdata_task_t;
@@ -130,7 +129,7 @@ typedef enum {
 /** @} */
 
 /************************** Global ******************************************/
-XBT_PUBLIC(void) MSG_config(const char *key, const char *value);
+XBT_PUBLIC void MSG_config(const char* key, const char* value);
 /** \ingroup msg_simulation
  *  \brief Initialize the MSG internal data.
  *  \hideinitializer
@@ -146,55 +145,52 @@ XBT_PUBLIC(void) MSG_config(const char *key, const char *value);
     MSG_init_nocheck(argc,argv);                                                        \
   } while (0)
 
-XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv);
-XBT_PUBLIC(msg_error_t) MSG_main();;
-XBT_PUBLIC(void) MSG_function_register(const char *name,
-                                       xbt_main_func_t code);
-XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code);
-XBT_PUBLIC(void) MSG_launch_application(const char *file);
+XBT_PUBLIC void MSG_init_nocheck(int* argc, char** argv);
+XBT_PUBLIC msg_error_t MSG_main();
+XBT_PUBLIC void MSG_function_register(const char* name, xbt_main_func_t code);
+XBT_PUBLIC void MSG_function_register_default(xbt_main_func_t code);
+XBT_PUBLIC void MSG_launch_application(const char* file);
 /*Bypass the parser */
-XBT_PUBLIC(void) MSG_set_function(const char *host_id,
-                                  const char *function_name,
-                                  xbt_dynar_t arguments);
+XBT_PUBLIC void MSG_set_function(const char* host_id, const char* function_name, xbt_dynar_t arguments);
 
-XBT_PUBLIC(double) MSG_get_clock();
-XBT_PUBLIC(unsigned long int) MSG_get_sent_msg();
+XBT_PUBLIC double MSG_get_clock();
+XBT_PUBLIC unsigned long int MSG_get_sent_msg();
 
 /************************** Net Zones ***********************************/
-XBT_PUBLIC(msg_netzone_t) MSG_zone_get_root();
-XBT_PUBLIC(const char*) MSG_zone_get_name(msg_netzone_t zone);
-XBT_PUBLIC(msg_netzone_t) MSG_zone_get_by_name(const char* name);
-XBT_PUBLIC(void) MSG_zone_get_sons(msg_netzone_t zone, xbt_dict_t whereto);
-XBT_PUBLIC(const char*) MSG_zone_get_property_value(msg_netzone_t as, const char* name);
-XBT_PUBLIC(void) MSG_zone_set_property_value(msg_netzone_t netzone, const char* name, char* value);
-XBT_PUBLIC(void) MSG_zone_get_hosts(msg_netzone_t zone, xbt_dynar_t whereto);
+XBT_PUBLIC msg_netzone_t MSG_zone_get_root();
+XBT_PUBLIC const char* MSG_zone_get_name(msg_netzone_t zone);
+XBT_PUBLIC msg_netzone_t MSG_zone_get_by_name(const char* name);
+XBT_PUBLIC void MSG_zone_get_sons(msg_netzone_t zone, xbt_dict_t whereto);
+XBT_PUBLIC const char* MSG_zone_get_property_value(msg_netzone_t as, const char* name);
+XBT_PUBLIC void MSG_zone_set_property_value(msg_netzone_t netzone, const char* name, char* value);
+XBT_PUBLIC void MSG_zone_get_hosts(msg_netzone_t zone, xbt_dynar_t whereto);
 
 /************************** Storage handling ***********************************/
-XBT_PUBLIC(const char*) sg_storage_get_name(sg_storage_t storage);
+XBT_PUBLIC const char* sg_storage_get_name(sg_storage_t storage);
 #define MSG_storage_get_name(storage) sg_storage_get_name(storage)
-XBT_PUBLIC(sg_storage_t) sg_storage_get_by_name(const char* name);
+XBT_PUBLIC sg_storage_t sg_storage_get_by_name(const char* name);
 #define MSG_storage_get_by_name(name) sg_storage_get_by_name(name)
-XBT_PUBLIC(xbt_dict_t) sg_storage_get_properties(sg_storage_t storage);
+XBT_PUBLIC xbt_dict_t sg_storage_get_properties(sg_storage_t storage);
 #define MSG_storage_get_properties(storage) sg_storage_get_properties(storage)
-XBT_PUBLIC(void) sg_storage_set_property_value(sg_storage_t storage, const char* name, char* value);
+XBT_PUBLIC void sg_storage_set_property_value(sg_storage_t storage, const char* name, char* value);
 #define MSG_storage_set_property_value(storage, name, value) sg_storage_set_property_value(storage, name, value)
-XBT_PUBLIC(const char*) sg_storage_get_property_value(sg_storage_t storage, const char* name);
+XBT_PUBLIC const char* sg_storage_get_property_value(sg_storage_t storage, const char* name);
 #define MSG_storage_get_property_value(storage, name) sg_storage_get_property_value(storage, name)
-XBT_PUBLIC(xbt_dynar_t) sg_storages_as_dynar();
+XBT_PUBLIC xbt_dynar_t sg_storages_as_dynar();
 #define MSG_storages_as_dynar() sg_storages_as_dynar()
-XBT_PUBLIC(void) sg_storage_set_data(sg_storage_t host, void* data);
+XBT_PUBLIC void sg_storage_set_data(sg_storage_t host, void* data);
 #define MSG_storage_set_data(storage, data) sg_storage_set_data(storage, data)
-XBT_PUBLIC(void*) sg_storage_get_data(sg_storage_t storage);
+XBT_PUBLIC void* sg_storage_get_data(sg_storage_t storage);
 #define MSG_storage_get_data(storage) sg_storage_get_data(storage)
-XBT_PUBLIC(const char*) sg_storage_get_host(sg_storage_t storage);
+XBT_PUBLIC const char* sg_storage_get_host(sg_storage_t storage);
 #define MSG_storage_get_host(storage) sg_storage_get_host(storage)
-XBT_PUBLIC(sg_size_t) sg_storage_read(sg_storage_t storage, sg_size_t size);
+XBT_PUBLIC sg_size_t sg_storage_read(sg_storage_t storage, sg_size_t size);
 #define MSG_storage_read(storage, size) sg_storage_read(storage, size)
-XBT_PUBLIC(sg_size_t) sg_storage_write(sg_storage_t storage, sg_size_t size);
+XBT_PUBLIC sg_size_t sg_storage_write(sg_storage_t storage, sg_size_t size);
 #define MSG_storage_write(storage, size) sg_storage_write(storage, size)
 
 /************************** Host handling ***********************************/
-XBT_PUBLIC(void) MSG_host_get_process_list(msg_host_t h, xbt_dynar_t whereto);
+XBT_PUBLIC void MSG_host_get_process_list(msg_host_t h, xbt_dynar_t whereto);
 
 XBT_ATTRIB_DEPRECATED_v320("Use MSG_host_get_speed(): v3.20 will drop MSG_host_get_current_power_peak() "
                            "completely.") static inline double MSG_host_get_current_power_peak(msg_host_t host)
@@ -202,142 +198,133 @@ XBT_ATTRIB_DEPRECATED_v320("Use MSG_host_get_speed(): v3.20 will drop MSG_host_g
   return MSG_host_get_speed(host);
 }
 
-XBT_PUBLIC(double) MSG_host_get_power_peak_at(msg_host_t h, int pstate);
+XBT_PUBLIC double MSG_host_get_power_peak_at(msg_host_t h, int pstate);
 
-XBT_PUBLIC(void) MSG_create_environment(const char *file);
+XBT_PUBLIC void MSG_create_environment(const char* file);
 
 /************************** Process handling *********************************/
-XBT_PUBLIC(msg_process_t) MSG_process_create(const char *name,
-                                           xbt_main_func_t code,
-                                           void *data, msg_host_t host);
-XBT_PUBLIC(msg_process_t)
-MSG_process_create_with_arguments(const char* name, xbt_main_func_t code, void* data, msg_host_t host, int argc,
-                                  char** argv);
-XBT_PUBLIC(msg_process_t)
-MSG_process_create_with_environment(const char* name, xbt_main_func_t code, void* data, msg_host_t host, int argc,
-                                    char** argv, xbt_dict_t properties);
-
-XBT_PUBLIC(msg_process_t) MSG_process_attach(const char* name, void* data, msg_host_t host, xbt_dict_t properties);
-XBT_PUBLIC(void) MSG_process_detach();
-
-XBT_PUBLIC(void) MSG_process_kill(msg_process_t process);
-XBT_PUBLIC(int) MSG_process_killall(int reset_PIDs);
-XBT_PUBLIC(msg_error_t) MSG_process_migrate(msg_process_t process, msg_host_t host);
-XBT_PUBLIC(void) MSG_process_yield();
-
-XBT_PUBLIC(void *) MSG_process_get_data(msg_process_t process);
-XBT_PUBLIC(msg_error_t) MSG_process_set_data(msg_process_t process,
-                                             void *data);
-XBT_PUBLIC(void) MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup);
-XBT_PUBLIC(msg_host_t) MSG_process_get_host(msg_process_t process);
-XBT_PUBLIC(msg_process_t) MSG_process_from_PID(int PID);
-XBT_PUBLIC(int) MSG_process_get_PID(msg_process_t process);
-XBT_PUBLIC(int) MSG_process_get_PPID(msg_process_t process);
-XBT_PUBLIC(const char *) MSG_process_get_name(msg_process_t process);
-XBT_PUBLIC(int) MSG_process_self_PID();
-XBT_PUBLIC(int) MSG_process_self_PPID();
-XBT_PUBLIC(const char*) MSG_process_self_name();
-XBT_PUBLIC(msg_process_t) MSG_process_self();
-XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar();
-XBT_PUBLIC(int) MSG_process_get_number();
-
-XBT_PUBLIC(msg_error_t) MSG_process_set_kill_time(msg_process_t process, double kill_time);
+XBT_PUBLIC msg_process_t MSG_process_create(const char* name, xbt_main_func_t code, void* data, msg_host_t host);
+XBT_PUBLIC msg_process_t MSG_process_create_with_arguments(const char* name, xbt_main_func_t code, void* data,
+                                                           msg_host_t host, int argc, char** argv);
+XBT_PUBLIC msg_process_t MSG_process_create_with_environment(const char* name, xbt_main_func_t code, void* data,
+                                                             msg_host_t host, int argc, char** argv,
+                                                             xbt_dict_t properties);
+
+XBT_PUBLIC msg_process_t MSG_process_attach(const char* name, void* data, msg_host_t host, xbt_dict_t properties);
+XBT_PUBLIC void MSG_process_detach();
+
+XBT_PUBLIC void MSG_process_kill(msg_process_t process);
+XBT_PUBLIC int MSG_process_killall();
+XBT_PUBLIC msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host);
+XBT_PUBLIC void MSG_process_yield();
+
+XBT_PUBLIC void* MSG_process_get_data(msg_process_t process);
+XBT_PUBLIC msg_error_t MSG_process_set_data(msg_process_t process, void* data);
+XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup);
+XBT_PUBLIC msg_host_t MSG_process_get_host(msg_process_t process);
+XBT_PUBLIC msg_process_t MSG_process_from_PID(int PID);
+XBT_PUBLIC int MSG_process_get_PID(msg_process_t process);
+XBT_PUBLIC int MSG_process_get_PPID(msg_process_t process);
+XBT_PUBLIC const char* MSG_process_get_name(msg_process_t process);
+XBT_PUBLIC int MSG_process_self_PID();
+XBT_PUBLIC int MSG_process_self_PPID();
+XBT_PUBLIC const char* MSG_process_self_name();
+XBT_PUBLIC msg_process_t MSG_process_self();
+XBT_PUBLIC xbt_dynar_t MSG_processes_as_dynar();
+XBT_PUBLIC int MSG_process_get_number();
+
+XBT_PUBLIC msg_error_t MSG_process_set_kill_time(msg_process_t process, double kill_time);
 
 /*property handlers*/
-XBT_PUBLIC(xbt_dict_t) MSG_process_get_properties(msg_process_t process);
-XBT_PUBLIC(const char*) MSG_process_get_property_value(msg_process_t process, const char* name);
+XBT_PUBLIC xbt_dict_t MSG_process_get_properties(msg_process_t process);
+XBT_PUBLIC const char* MSG_process_get_property_value(msg_process_t process, const char* name);
 
-XBT_PUBLIC(msg_error_t) MSG_process_suspend(msg_process_t process);
-XBT_PUBLIC(msg_error_t) MSG_process_resume(msg_process_t process);
-XBT_PUBLIC(int) MSG_process_is_suspended(msg_process_t process);
-XBT_PUBLIC(void) MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void *data);
-XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
+XBT_PUBLIC msg_error_t MSG_process_suspend(msg_process_t process);
+XBT_PUBLIC msg_error_t MSG_process_resume(msg_process_t process);
+XBT_PUBLIC int MSG_process_is_suspended(msg_process_t process);
+XBT_PUBLIC void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void* data);
+XBT_PUBLIC void MSG_process_auto_restart_set(msg_process_t process, int auto_restart);
 
-XBT_PUBLIC(void) MSG_process_daemonize(msg_process_t process);
-XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process);
-XBT_PUBLIC(void) MSG_process_ref(msg_process_t process);
-XBT_PUBLIC(void) MSG_process_unref(msg_process_t process);
+XBT_PUBLIC void MSG_process_daemonize(msg_process_t process);
+XBT_PUBLIC msg_process_t MSG_process_restart(msg_process_t process);
+XBT_PUBLIC void MSG_process_ref(msg_process_t process);
+XBT_PUBLIC void MSG_process_unref(msg_process_t process);
 
 /************************** Task handling ************************************/
-XBT_PUBLIC(msg_task_t) MSG_task_create(const char* name, double flops_amount, double bytes_amount, void* data);
-XBT_PUBLIC(msg_task_t) MSG_parallel_task_create(const char *name,
-                                              int host_nb,
-                                              const msg_host_t * host_list,
-                                              double *flops_amount,
-                                              double *bytes_amount,
-                                              void *data);
-XBT_PUBLIC(void *) MSG_task_get_data(msg_task_t task);
-XBT_PUBLIC(void) MSG_task_set_data(msg_task_t task, void *data);
-XBT_PUBLIC(void) MSG_task_set_copy_callback(void (*callback) (
-    msg_task_t task, msg_process_t src, msg_process_t dst));
-XBT_PUBLIC(msg_process_t) MSG_task_get_sender(msg_task_t task);
-XBT_PUBLIC(msg_host_t) MSG_task_get_source(msg_task_t task);
-XBT_PUBLIC(const char *) MSG_task_get_name(msg_task_t task);
-XBT_PUBLIC(void) MSG_task_set_name(msg_task_t task, const char *name);
-XBT_PUBLIC(msg_error_t) MSG_task_cancel(msg_task_t task);
-XBT_PUBLIC(msg_error_t) MSG_task_destroy(msg_task_t task);
-
-XBT_PUBLIC(msg_error_t) MSG_task_execute(msg_task_t task);
-XBT_PUBLIC(msg_error_t) MSG_parallel_task_execute(msg_task_t task);
-XBT_PUBLIC(msg_error_t) MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeout);
-XBT_PUBLIC(void) MSG_task_set_priority(msg_task_t task, double priority);
-XBT_PUBLIC(void) MSG_task_set_bound(msg_task_t task, double bound);
-
-XBT_PUBLIC(msg_error_t) MSG_process_join(msg_process_t process, double timeout);
-XBT_PUBLIC(msg_error_t) MSG_process_sleep(double nb_sec);
-
-XBT_PUBLIC(void) MSG_task_set_flops_amount(msg_task_t task, double flops_amount);
-XBT_PUBLIC(double) MSG_task_get_flops_amount(msg_task_t task);
-XBT_PUBLIC(double) MSG_task_get_remaining_work_ratio(msg_task_t task);
-XBT_PUBLIC(void) MSG_task_set_bytes_amount(msg_task_t task, double bytes_amount);
-
-
-XBT_PUBLIC(double) MSG_task_get_remaining_communication(msg_task_t task);
-XBT_PUBLIC(double) MSG_task_get_bytes_amount(msg_task_t task);
-
-XBT_PUBLIC(msg_error_t) MSG_task_receive_ext(msg_task_t* task, const char* alias, double timeout, msg_host_t host);
-
-XBT_PUBLIC(msg_error_t) MSG_task_receive_with_timeout(msg_task_t* task, const char* alias, double timeout);
-
-XBT_PUBLIC(msg_error_t) MSG_task_receive(msg_task_t* task, const char* alias);
+XBT_PUBLIC msg_task_t MSG_task_create(const char* name, double flops_amount, double bytes_amount, void* data);
+XBT_PUBLIC msg_task_t MSG_parallel_task_create(const char* name, int host_nb, const msg_host_t* host_list,
+                                               double* flops_amount, double* bytes_amount, void* data);
+XBT_PUBLIC void* MSG_task_get_data(msg_task_t task);
+XBT_PUBLIC void MSG_task_set_data(msg_task_t task, void* data);
+XBT_PUBLIC void MSG_task_set_copy_callback(void (*callback)(msg_task_t task, msg_process_t src, msg_process_t dst));
+XBT_PUBLIC msg_process_t MSG_task_get_sender(msg_task_t task);
+XBT_PUBLIC msg_host_t MSG_task_get_source(msg_task_t task);
+XBT_PUBLIC const char* MSG_task_get_name(msg_task_t task);
+XBT_PUBLIC void MSG_task_set_name(msg_task_t task, const char* name);
+XBT_PUBLIC msg_error_t MSG_task_cancel(msg_task_t task);
+XBT_PUBLIC msg_error_t MSG_task_destroy(msg_task_t task);
+
+XBT_PUBLIC msg_error_t MSG_task_execute(msg_task_t task);
+XBT_PUBLIC msg_error_t MSG_parallel_task_execute(msg_task_t task);
+XBT_PUBLIC msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeout);
+XBT_PUBLIC void MSG_task_set_priority(msg_task_t task, double priority);
+XBT_PUBLIC void MSG_task_set_bound(msg_task_t task, double bound);
+
+XBT_PUBLIC msg_error_t MSG_process_join(msg_process_t process, double timeout);
+XBT_PUBLIC msg_error_t MSG_process_sleep(double nb_sec);
+
+XBT_PUBLIC void MSG_task_set_flops_amount(msg_task_t task, double flops_amount);
+XBT_PUBLIC double MSG_task_get_flops_amount(msg_task_t task);
+XBT_PUBLIC double MSG_task_get_remaining_work_ratio(msg_task_t task);
+XBT_PUBLIC void MSG_task_set_bytes_amount(msg_task_t task, double bytes_amount);
+
+XBT_PUBLIC double MSG_task_get_remaining_communication(msg_task_t task);
+XBT_PUBLIC double MSG_task_get_bytes_amount(msg_task_t task);
+
+XBT_PUBLIC msg_error_t MSG_task_receive_ext(msg_task_t* task, const char* alias, double timeout, msg_host_t host);
+
+XBT_PUBLIC msg_error_t MSG_task_receive_with_timeout(msg_task_t* task, const char* alias, double timeout);
+
+XBT_PUBLIC msg_error_t MSG_task_receive(msg_task_t* task, const char* alias);
 #define MSG_task_recv(t,a) MSG_task_receive(t,a)
 
-XBT_PUBLIC(msg_error_t)
-MSG_task_receive_ext_bounded(msg_task_t* task, const char* alias, double timeout, msg_host_t host, double rate);
+XBT_PUBLIC msg_error_t MSG_task_receive_ext_bounded(msg_task_t* task, const char* alias, double timeout,
+                                                    msg_host_t host, double rate);
 
-XBT_PUBLIC(msg_error_t)
-MSG_task_receive_with_timeout_bounded(msg_task_t* task, const char* alias, double timeout, double rate);
-XBT_PUBLIC(msg_error_t) MSG_task_receive_bounded(msg_task_t * task, const char *alias,double rate);
+XBT_PUBLIC msg_error_t MSG_task_receive_with_timeout_bounded(msg_task_t* task, const char* alias, double timeout,
+                                                             double rate);
+XBT_PUBLIC msg_error_t MSG_task_receive_bounded(msg_task_t* task, const char* alias, double rate);
 #define MSG_task_recv_bounded(t,a,r) MSG_task_receive_bounded(t,a,r)
 
-XBT_PUBLIC(msg_comm_t) MSG_task_isend(msg_task_t task, const char *alias);
-XBT_PUBLIC(msg_comm_t) MSG_task_isend_bounded(msg_task_t task, const char *alias, double maxrate);
+XBT_PUBLIC msg_comm_t MSG_task_isend(msg_task_t task, const char* alias);
+XBT_PUBLIC msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char* alias, double maxrate);
 XBT_ATTRIB_DEPRECATED_v320(
     "This function will be removed from SimGrid v3.20. If you really need this function, please speak up quickly.")
-    XBT_PUBLIC(msg_comm_t) MSG_task_isend_with_matching(msg_task_t task, const char* alias,
-                                                        int (*match_fun)(void*, void*, void*), void* match_data);
-
-XBT_PUBLIC(void) MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup);
-XBT_PUBLIC(void) MSG_task_dsend_bounded(msg_task_t task, const char *alias, void_f_pvoid_t cleanup, double maxrate);
-XBT_PUBLIC(msg_comm_t) MSG_task_irecv(msg_task_t * task, const char *alias);
-XBT_PUBLIC(msg_comm_t) MSG_task_irecv_bounded(msg_task_t * task, const char *alias, double rate);
-XBT_PUBLIC(int) MSG_comm_test(msg_comm_t comm);
-XBT_PUBLIC(int) MSG_comm_testany(xbt_dynar_t comms);
-XBT_PUBLIC(void) MSG_comm_destroy(msg_comm_t comm);
-XBT_PUBLIC(msg_error_t) MSG_comm_wait(msg_comm_t comm, double timeout);
-XBT_PUBLIC(void) MSG_comm_waitall(msg_comm_t * comm, int nb_elem, double timeout);
-XBT_PUBLIC(int) MSG_comm_waitany(xbt_dynar_t comms);
-XBT_PUBLIC(msg_task_t) MSG_comm_get_task(msg_comm_t comm);
-XBT_PUBLIC(msg_error_t) MSG_comm_get_status(msg_comm_t comm);
-
-XBT_PUBLIC(int) MSG_task_listen(const char *alias);
-XBT_PUBLIC(msg_error_t) MSG_task_send_with_timeout(msg_task_t task, const char *alias, double timeout);
-XBT_PUBLIC(msg_error_t) MSG_task_send_with_timeout_bounded(msg_task_t task, const char *alias, double timeout, double maxrate);
-XBT_PUBLIC(msg_error_t) MSG_task_send(msg_task_t task, const char *alias);
-XBT_PUBLIC(msg_error_t) MSG_task_send_bounded(msg_task_t task, const char *alias, double rate);
-XBT_PUBLIC(int) MSG_task_listen_from(const char *alias);
-XBT_PUBLIC(void) MSG_task_set_category (msg_task_t task, const char *category);
-XBT_PUBLIC(const char *) MSG_task_get_category (msg_task_t task);
+    XBT_PUBLIC msg_comm_t MSG_task_isend_with_matching(msg_task_t task, const char* alias,
+                                                       int (*match_fun)(void*, void*, void*), void* match_data);
+
+XBT_PUBLIC void MSG_task_dsend(msg_task_t task, const char* alias, void_f_pvoid_t cleanup);
+XBT_PUBLIC void MSG_task_dsend_bounded(msg_task_t task, const char* alias, void_f_pvoid_t cleanup, double maxrate);
+XBT_PUBLIC msg_comm_t MSG_task_irecv(msg_task_t* task, const char* alias);
+XBT_PUBLIC msg_comm_t MSG_task_irecv_bounded(msg_task_t* task, const char* alias, double rate);
+XBT_PUBLIC int MSG_comm_test(msg_comm_t comm);
+XBT_PUBLIC int MSG_comm_testany(xbt_dynar_t comms);
+XBT_PUBLIC void MSG_comm_destroy(msg_comm_t comm);
+XBT_PUBLIC msg_error_t MSG_comm_wait(msg_comm_t comm, double timeout);
+XBT_PUBLIC void MSG_comm_waitall(msg_comm_t* comm, int nb_elem, double timeout);
+XBT_PUBLIC int MSG_comm_waitany(xbt_dynar_t comms);
+XBT_PUBLIC msg_task_t MSG_comm_get_task(msg_comm_t comm);
+XBT_PUBLIC msg_error_t MSG_comm_get_status(msg_comm_t comm);
+
+XBT_PUBLIC int MSG_task_listen(const char* alias);
+XBT_PUBLIC msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char* alias, double timeout);
+XBT_PUBLIC msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char* alias, double timeout,
+                                                          double maxrate);
+XBT_PUBLIC msg_error_t MSG_task_send(msg_task_t task, const char* alias);
+XBT_PUBLIC msg_error_t MSG_task_send_bounded(msg_task_t task, const char* alias, double rate);
+XBT_PUBLIC int MSG_task_listen_from(const char* alias);
+XBT_PUBLIC void MSG_task_set_category(msg_task_t task, const char* category);
+XBT_PUBLIC const char* MSG_task_get_category(msg_task_t task);
 
 /************************** Mailbox handling ************************************/
 
@@ -347,12 +334,12 @@ XBT_PUBLIC(const char *) MSG_task_get_category (msg_task_t task);
  * This call should be done before issuing any receive, and on the receiver's side only
  * @param alias    The alias of the mailbox to modify.
  */
-XBT_PUBLIC(void) MSG_mailbox_set_async(const char *alias);
+XBT_PUBLIC void MSG_mailbox_set_async(const char* alias);
 
 /************************** Action handling **********************************/
-XBT_PUBLIC(msg_error_t) MSG_action_trace_run(char *path);
-XBT_PUBLIC(void) MSG_action_init();
-XBT_PUBLIC(void) MSG_action_exit();
+XBT_PUBLIC msg_error_t MSG_action_trace_run(char* path);
+XBT_PUBLIC void MSG_action_init();
+XBT_PUBLIC void MSG_action_exit();
 
 /** @brief Opaque type representing a semaphore
  *  @ingroup msg_synchro
@@ -360,13 +347,13 @@ XBT_PUBLIC(void) MSG_action_exit();
  */
 typedef struct s_smx_sem_t* msg_sem_t; // Yeah that's a rename of the smx_sem_t which doesnt require smx_sem_t to be
                                        // declared here
-XBT_PUBLIC(msg_sem_t) MSG_sem_init(int initial_value);
-XBT_PUBLIC(void) MSG_sem_acquire(msg_sem_t sem);
-XBT_PUBLIC(msg_error_t) MSG_sem_acquire_timeout(msg_sem_t sem, double timeout);
-XBT_PUBLIC(void) MSG_sem_release(msg_sem_t sem);
-XBT_PUBLIC(int) MSG_sem_get_capacity(msg_sem_t sem);
-XBT_PUBLIC(void) MSG_sem_destroy(msg_sem_t sem);
-XBT_PUBLIC(int) MSG_sem_would_block(msg_sem_t sem);
+XBT_PUBLIC msg_sem_t MSG_sem_init(int initial_value);
+XBT_PUBLIC void MSG_sem_acquire(msg_sem_t sem);
+XBT_PUBLIC msg_error_t MSG_sem_acquire_timeout(msg_sem_t sem, double timeout);
+XBT_PUBLIC void MSG_sem_release(msg_sem_t sem);
+XBT_PUBLIC int MSG_sem_get_capacity(msg_sem_t sem);
+XBT_PUBLIC void MSG_sem_destroy(msg_sem_t sem);
+XBT_PUBLIC int MSG_sem_would_block(msg_sem_t sem);
 
 /** @brief Opaque type representing a barrier identifier
  *  @ingroup msg_synchro
@@ -375,9 +362,9 @@ XBT_PUBLIC(int) MSG_sem_would_block(msg_sem_t sem);
 
 #define MSG_BARRIER_SERIAL_PROCESS -1
 typedef struct s_msg_bar_t* msg_bar_t;
-XBT_PUBLIC(msg_bar_t) MSG_barrier_init( unsigned int count);
-XBT_PUBLIC(void) MSG_barrier_destroy(msg_bar_t bar);
-XBT_PUBLIC(int) MSG_barrier_wait(msg_bar_t bar);
+XBT_PUBLIC msg_bar_t MSG_barrier_init(unsigned int count);
+XBT_PUBLIC void MSG_barrier_destroy(msg_bar_t bar);
+XBT_PUBLIC int MSG_barrier_wait(msg_bar_t bar);
 
 /** @brief Opaque type describing a Virtual Machine.
  *  @ingroup msg_VMs
@@ -388,56 +375,56 @@ XBT_PUBLIC(int) MSG_barrier_wait(msg_bar_t bar);
  *
  */
 
-XBT_PUBLIC(int) sg_vm_is_created(sg_vm_t vm);
+XBT_PUBLIC int sg_vm_is_created(sg_vm_t vm);
 #define MSG_vm_is_created(vm) sg_vm_is_created(vm)
-XBT_PUBLIC(int) sg_vm_is_running(sg_vm_t vm);
+XBT_PUBLIC int sg_vm_is_running(sg_vm_t vm);
 #define MSG_vm_is_running(vm) sg_vm_is_running(vm)
-XBT_PUBLIC(int) sg_vm_is_suspended(sg_vm_t vm);
+XBT_PUBLIC int sg_vm_is_suspended(sg_vm_t vm);
 #define MSG_vm_is_suspended(vm) sg_vm_is_suspended(vm)
 
-XBT_PUBLIC(const char*) sg_vm_get_name(sg_vm_t vm);
+XBT_PUBLIC const char* sg_vm_get_name(sg_vm_t vm);
 #define MSG_vm_get_name(vm) sg_vm_get_name(vm)
-XBT_PUBLIC(void) sg_vm_set_ramsize(sg_vm_t vm, size_t size);
+XBT_PUBLIC void sg_vm_set_ramsize(sg_vm_t vm, size_t size);
 #define MSG_vm_set_ramsize(vm, size) sg_vm_set_ramsize(vm, size)
-XBT_PUBLIC(size_t) sg_vm_get_ramsize(sg_vm_t vm);
+XBT_PUBLIC size_t sg_vm_get_ramsize(sg_vm_t vm);
 #define MSG_vm_get_ramsize(vm) sg_vm_get_ramsize(vm)
 
-XBT_PUBLIC(sg_vm_t) sg_vm_create_core(sg_host_t pm, const char* name);
+XBT_PUBLIC sg_vm_t sg_vm_create_core(sg_host_t pm, const char* name);
 #define MSG_vm_create_core(vm, name) sg_vm_create_core(vm, name)
-XBT_PUBLIC(sg_vm_t) sg_vm_create_multicore(sg_host_t pm, const char* name, int coreAmount);
+XBT_PUBLIC sg_vm_t sg_vm_create_multicore(sg_host_t pm, const char* name, int coreAmount);
 #define MSG_vm_create_multicore(vm, name, coreAmount) sg_vm_create_multicore(vm, name, coreAmount)
 
 XBT_ATTRIB_DEPRECATED_v322("Use sg_vm_create_migratable() from the live migration plugin: "
-                           "v3.22 will drop MSG_vm_create() completely.") XBT_PUBLIC(msg_vm_t)
+                           "v3.22 will drop MSG_vm_create() completely.") XBT_PUBLIC msg_vm_t
     MSG_vm_create(msg_host_t ind_pm, const char* name, int coreAmount, int ramsize, int mig_netspeed, int dp_intensity);
 
-XBT_PUBLIC(void) sg_vm_start(msg_vm_t vm);
+XBT_PUBLIC void sg_vm_start(msg_vm_t vm);
 #define MSG_vm_start(vm) sg_vm_start(vm)
-XBT_PUBLIC(void) sg_vm_suspend(msg_vm_t vm);
+XBT_PUBLIC void sg_vm_suspend(msg_vm_t vm);
 #define MSG_vm_suspend(vm) sg_vm_suspend(vm)
-XBT_PUBLIC(void) sg_vm_resume(msg_vm_t vm);
+XBT_PUBLIC void sg_vm_resume(msg_vm_t vm);
 #define MSG_vm_resume(vm) sg_vm_resume(vm)
-XBT_PUBLIC(void) sg_vm_shutdown(msg_vm_t vm);
+XBT_PUBLIC void sg_vm_shutdown(msg_vm_t vm);
 #define MSG_vm_shutdown(vm) sg_vm_shutdown(vm)
-XBT_PUBLIC(void) sg_vm_destroy(msg_vm_t vm);
+XBT_PUBLIC void sg_vm_destroy(msg_vm_t vm);
 #define MSG_vm_destroy(vm) sg_vm_destroy(vm)
-XBT_PUBLIC(sg_host_t) sg_vm_get_pm(sg_vm_t vm);
+XBT_PUBLIC sg_host_t sg_vm_get_pm(sg_vm_t vm);
 #define MSG_vm_get_pm(vm) sg_vm_get_pm(vm)
-XBT_PUBLIC(void) sg_vm_set_bound(sg_vm_t vm, double bound);
+XBT_PUBLIC void sg_vm_set_bound(sg_vm_t vm, double bound);
 #define MSG_vm_set_bound(vm, bound) sg_vm_set_bound(vm, bound)
 
 #include "simgrid/instr.h"
 
 /* ****************************************************************************************** */
 /* Used only by the bindings -- unclean pimple, please ignore if you're not writing a binding */
-XBT_PUBLIC(smx_context_t) MSG_process_get_smx_ctx(msg_process_t process);
+XBT_PUBLIC smx_context_t MSG_process_get_smx_ctx(msg_process_t process);
 
 SG_END_DECL()
 
 #ifdef __cplusplus
-XBT_PUBLIC(msg_process_t)
-MSG_process_create_from_stdfunc(const char* name, std::function<void()> code, void* data, msg_host_t host,
-                                std::map<std::string, std::string>* properties);
+XBT_PUBLIC msg_process_t MSG_process_create_from_stdfunc(const char* name, std::function<void()> code, void* data,
+                                                         msg_host_t host,
+                                                         std::map<std::string, std::string>* properties);
 #endif
 
 #endif
index 57726ed..bd856b9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017. The SimGrid Team.
+/* Copyright (c) 2017-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -12,7 +12,7 @@
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) sg_host_dvfs_plugin_init();
+XBT_PUBLIC void sg_host_dvfs_plugin_init();
 
 #define MSG_host_dvfs_plugin_init() sg_host_dvfs_plugin_init()
 
index 285345b..3cfe6e7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2016-2018. 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. */
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) sg_host_energy_plugin_init();
-XBT_PUBLIC(void) sg_host_energy_update_all();
-XBT_PUBLIC(double) sg_host_get_consumed_energy(sg_host_t host);
-XBT_PUBLIC(double) sg_host_get_wattmin_at(sg_host_t host, int pstate);
-XBT_PUBLIC(double) sg_host_get_wattmax_at(sg_host_t host, int pstate);
-XBT_PUBLIC(double) sg_host_get_current_consumption(sg_host_t host);
+XBT_PUBLIC void sg_host_energy_plugin_init();
+XBT_PUBLIC void sg_host_energy_update_all();
+XBT_PUBLIC double sg_host_get_consumed_energy(sg_host_t host);
+XBT_PUBLIC double sg_host_get_wattmin_at(sg_host_t host, int pstate);
+XBT_PUBLIC double sg_host_get_wattmax_at(sg_host_t host, int pstate);
+XBT_PUBLIC double sg_host_get_current_consumption(sg_host_t host);
 
-XBT_PUBLIC(void) sg_link_energy_plugin_init();
-XBT_PUBLIC(double) sg_link_get_consumed_energy(sg_link_t link);
+XBT_PUBLIC void sg_link_energy_plugin_init();
+XBT_PUBLIC double sg_link_get_consumed_energy(sg_link_t link);
 
-XBT_PUBLIC(int) sg_link_energy_is_inited();
+XBT_PUBLIC int sg_link_energy_is_inited();
 
 #define MSG_host_energy_plugin_init() sg_host_energy_plugin_init()
 #define MSG_host_get_consumed_energy(host) sg_host_get_consumed_energy(host)
index 41363fd..cee6835 100644 (file)
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) sg_storage_file_system_init();
-XBT_PUBLIC(sg_file_t) sg_file_open(const char* fullpath, void* data);
-XBT_PUBLIC(sg_size_t) sg_file_read(sg_file_t fd, sg_size_t size);
-XBT_PUBLIC(sg_size_t) sg_file_write(sg_file_t fd, sg_size_t size);
-XBT_PUBLIC(void) sg_file_close(sg_file_t fd);
+XBT_PUBLIC void sg_storage_file_system_init();
+XBT_PUBLIC sg_file_t sg_file_open(const char* fullpath, void* data);
+XBT_PUBLIC sg_size_t sg_file_read(sg_file_t fd, sg_size_t size);
+XBT_PUBLIC sg_size_t sg_file_write(sg_file_t fd, sg_size_t size);
+XBT_PUBLIC void sg_file_close(sg_file_t fd);
 
-XBT_PUBLIC(const char*) sg_file_get_name(sg_file_t fd);
-XBT_PUBLIC(sg_size_t) sg_file_get_size(sg_file_t fd);
-XBT_PUBLIC(void) sg_file_dump(sg_file_t fd);
-XBT_PUBLIC(void*) sg_file_get_data(sg_file_t fd);
-XBT_PUBLIC(void) sg_file_set_data(sg_file_t fd, void* data);
-XBT_PUBLIC(void) sg_file_seek(sg_file_t fd, sg_offset_t offset, int origin);
-XBT_PUBLIC(sg_size_t) sg_file_tell(sg_file_t fd);
-XBT_PUBLIC(void) sg_file_move(sg_file_t fd, const char* fullpath);
-XBT_PUBLIC(void) sg_file_unlink(sg_file_t fd);
-XBT_PUBLIC(int) sg_file_rcopy(sg_file_t file, sg_host_t host, const char* fullpath);
-XBT_PUBLIC(int) sg_file_rmove(sg_file_t file, sg_host_t host, const char* fullpath);
+XBT_PUBLIC const char* sg_file_get_name(sg_file_t fd);
+XBT_PUBLIC sg_size_t sg_file_get_size(sg_file_t fd);
+XBT_PUBLIC void sg_file_dump(sg_file_t fd);
+XBT_PUBLIC void* sg_file_get_data(sg_file_t fd);
+XBT_PUBLIC void sg_file_set_data(sg_file_t fd, void* data);
+XBT_PUBLIC void sg_file_seek(sg_file_t fd, sg_offset_t offset, int origin);
+XBT_PUBLIC sg_size_t sg_file_tell(sg_file_t fd);
+XBT_PUBLIC void sg_file_move(sg_file_t fd, const char* fullpath);
+XBT_PUBLIC void sg_file_unlink(sg_file_t fd);
+XBT_PUBLIC int sg_file_rcopy(sg_file_t file, sg_host_t host, const char* fullpath);
+XBT_PUBLIC int sg_file_rmove(sg_file_t file, sg_host_t host, const char* fullpath);
 
-XBT_PUBLIC(sg_size_t) sg_storage_get_size_free(sg_storage_t st);
-XBT_PUBLIC(sg_size_t) sg_storage_get_size_used(sg_storage_t st);
-XBT_PUBLIC(sg_size_t) sg_storage_get_size(sg_storage_t st);
-XBT_PUBLIC(xbt_dict_t) sg_storage_get_content(sg_storage_t storage);
+XBT_PUBLIC sg_size_t sg_storage_get_size_free(sg_storage_t st);
+XBT_PUBLIC sg_size_t sg_storage_get_size_used(sg_storage_t st);
+XBT_PUBLIC sg_size_t sg_storage_get_size(sg_storage_t st);
+XBT_PUBLIC xbt_dict_t sg_storage_get_content(sg_storage_t storage);
 
-XBT_PUBLIC(xbt_dict_t) sg_host_get_storage_content(sg_host_t host);
+XBT_PUBLIC xbt_dict_t sg_host_get_storage_content(sg_host_t host);
 
 #define MSG_file_open(fullpath, data) sg_file_open(fullpath, data)
 #define MSG_file_read(fd, size) sg_file_read(fd, size)
index 3a5107a..a75cac2 100644 (file)
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) sg_vm_live_migration_plugin_init();
+XBT_PUBLIC void sg_vm_live_migration_plugin_init();
 XBT_PRIVATE void sg_vm_dirty_page_tracking_init();
-XBT_PUBLIC(void) sg_vm_start_dirty_page_tracking(sg_vm_t vm);
-XBT_PUBLIC(void) sg_vm_stop_dirty_page_tracking(sg_vm_t vm);
-XBT_PUBLIC(double) sg_vm_lookup_computed_flops(sg_vm_t vm);
-XBT_PUBLIC(void) sg_vm_migrate(sg_vm_t vm, sg_host_t dst_pm);
-XBT_PUBLIC(void) sg_vm_set_dirty_page_intensity(sg_vm_t vm, double intensity);
-XBT_PUBLIC(double) sg_vm_get_dirty_page_intensity(sg_vm_t vm);
-XBT_PUBLIC(void) sg_vm_set_working_set_memory(sg_vm_t vm, sg_size_t size);
-XBT_PUBLIC(sg_size_t) sg_vm_get_working_set_memory(sg_vm_t vm);
-XBT_PUBLIC(void) sg_vm_set_migration_speed(sg_vm_t vm, double speed);
-XBT_PUBLIC(double) sg_vm_get_migration_speed(sg_vm_t vm);
-XBT_PUBLIC(double) sg_vm_get_max_downtime(sg_vm_t vm);
-XBT_PUBLIC(int) sg_vm_is_migrating(sg_vm_t vm);
-XBT_PUBLIC(sg_vm_t)
-sg_vm_create_migratable(sg_host_t pm, const char* name, int coreAmount, int ramsize, int mig_netspeed,
-                        int dp_intensity);
+XBT_PUBLIC void sg_vm_start_dirty_page_tracking(sg_vm_t vm);
+XBT_PUBLIC void sg_vm_stop_dirty_page_tracking(sg_vm_t vm);
+XBT_PUBLIC double sg_vm_lookup_computed_flops(sg_vm_t vm);
+XBT_PUBLIC void sg_vm_migrate(sg_vm_t vm, sg_host_t dst_pm);
+XBT_PUBLIC void sg_vm_set_dirty_page_intensity(sg_vm_t vm, double intensity);
+XBT_PUBLIC double sg_vm_get_dirty_page_intensity(sg_vm_t vm);
+XBT_PUBLIC void sg_vm_set_working_set_memory(sg_vm_t vm, sg_size_t size);
+XBT_PUBLIC sg_size_t sg_vm_get_working_set_memory(sg_vm_t vm);
+XBT_PUBLIC void sg_vm_set_migration_speed(sg_vm_t vm, double speed);
+XBT_PUBLIC double sg_vm_get_migration_speed(sg_vm_t vm);
+XBT_PUBLIC double sg_vm_get_max_downtime(sg_vm_t vm);
+XBT_PUBLIC int sg_vm_is_migrating(sg_vm_t vm);
+XBT_PUBLIC sg_vm_t sg_vm_create_migratable(sg_host_t pm, const char* name, int coreAmount, int ramsize,
+                                           int mig_netspeed, int dp_intensity);
 
 #define MSG_vm_live_migration_plugin_init() sg_vm_live_migration_plugin_init()
 
index 5b7f903..d6d09b9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017. The SimGrid Team.
+/* Copyright (c) 2017-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) sg_host_load_plugin_init();
-XBT_PUBLIC(double) sg_host_get_current_load(sg_host_t host);
-XBT_PUBLIC(double) sg_host_get_avg_load(sg_host_t host);
-XBT_PUBLIC(double) sg_host_get_idle_time(sg_host_t host);
-XBT_PUBLIC(double) sg_host_get_computed_flops(sg_host_t host);
-XBT_PUBLIC(void) sg_host_load_reset(sg_host_t host);
+XBT_PUBLIC void sg_host_load_plugin_init();
+XBT_PUBLIC double sg_host_get_current_load(sg_host_t host);
+XBT_PUBLIC double sg_host_get_avg_load(sg_host_t host);
+XBT_PUBLIC double sg_host_get_idle_time(sg_host_t host);
+XBT_PUBLIC double sg_host_get_computed_flops(sg_host_t host);
+XBT_PUBLIC void sg_host_load_reset(sg_host_t host);
 
 #define MSG_host_load_plugin_init() sg_host_load_plugin_init()
 #define MSG_host_get_current_load(host) sg_host_get_current_load(host)
index 5e801f4..b5ef0b4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -18,13 +18,13 @@ namespace s4u {
  *
  * This class is the ancestor of every activities that an actor can undertake, that is, of the actions that do take time in the simulated world.
  */
-XBT_PUBLIC_CLASS Activity {
+class XBT_PUBLIC Activity {
   friend Comm;
-  friend XBT_PUBLIC(void) intrusive_ptr_release(Comm * c);
-  friend XBT_PUBLIC(void) intrusive_ptr_add_ref(Comm * c);
+  friend XBT_PUBLIC void intrusive_ptr_release(Comm * c);
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(Comm * c);
   friend Exec;
-  friend XBT_PUBLIC(void) intrusive_ptr_release(Exec * e);
-  friend XBT_PUBLIC(void) intrusive_ptr_add_ref(Exec * e);
+  friend XBT_PUBLIC void intrusive_ptr_release(Exec * e);
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(Exec * e);
 
 protected:
   Activity()  = default;
index 2a77e8e..598721c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -129,8 +129,7 @@ namespace s4u {
  */
 
 /** @brief Simulation Agent */
-XBT_PUBLIC_CLASS Actor : public simgrid::xbt::Extendable<Actor>
-{
+class XBT_PUBLIC Actor : public simgrid::xbt::Extendable<Actor> {
   friend Exec;
   friend Mailbox;
   friend simgrid::simix::ActorImpl;
@@ -156,8 +155,8 @@ public:
   Actor& operator=(Actor const&) = delete;
 
   // ***** Reference count *****
-  friend XBT_PUBLIC(void) intrusive_ptr_add_ref(Actor * actor);
-  friend XBT_PUBLIC(void) intrusive_ptr_release(Actor * actor);
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(Actor * actor);
+  friend XBT_PUBLIC void intrusive_ptr_release(Actor * actor);
 
   // ***** Actor creation *****
   /** Retrieve a reference to myself */
@@ -290,11 +289,11 @@ public:
  *  @brief Static methods working on the current actor (see @ref s4u::Actor) */
 namespace this_actor {
 
-XBT_PUBLIC(bool) isMaestro();
+XBT_PUBLIC bool isMaestro();
 
 /** Block the actor sleeping for that amount of seconds (may throws hostFailure) */
-XBT_PUBLIC(void) sleep_for(double duration);
-XBT_PUBLIC(void) sleep_until(double timeout);
+XBT_PUBLIC void sleep_for(double duration);
+XBT_PUBLIC void sleep_until(double timeout);
 
 template <class Rep, class Period> inline void sleep_for(std::chrono::duration<Rep, Period> duration)
 {
@@ -315,76 +314,76 @@ XBT_ATTRIB_DEPRECATED_v320("Use sleep_for(): v3.20 will turn this warning into a
 }
 
 /** Block the actor, computing the given amount of flops */
-XBT_PUBLIC(void) execute(double flop);
+XBT_PUBLIC void execute(double flop);
 
 /** Block the actor, computing the given amount of flops at the given priority.
  *  An execution of priority 2 computes twice as fast as an execution at priority 1. */
-XBT_PUBLIC(void) execute(double flop, double priority);
+XBT_PUBLIC void execute(double flop, double priority);
 
-XBT_PUBLIC(void) parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount);
-XBT_PUBLIC(void)
-parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double timeout);
+XBT_PUBLIC void parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount);
+XBT_PUBLIC void parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount,
+                                 double timeout);
 
-XBT_PUBLIC(ExecPtr) exec_init(double flops_amounts);
-XBT_PUBLIC(ExecPtr) exec_async(double flops_amounts);
+XBT_PUBLIC ExecPtr exec_init(double flops_amounts);
+XBT_PUBLIC ExecPtr exec_async(double flops_amounts);
 
 /** Block the actor until it gets a message from the given mailbox.
  *
  * See \ref Comm for the full communication API (including non blocking communications).
  */
-XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.") XBT_PUBLIC(void*)
-    recv(MailboxPtr chan);
-XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.") XBT_PUBLIC(void*)
-    recv(MailboxPtr chan, double timeout);
-XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::recv_async(): v3.20 will turn this warning into an error.") XBT_PUBLIC(CommPtr)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.") XBT_PUBLIC
+    void* recv(MailboxPtr chan);
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will turn this warning into an error.") XBT_PUBLIC
+    void* recv(MailboxPtr chan, double timeout);
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::recv_async(): v3.20 will turn this warning into an error.") XBT_PUBLIC CommPtr
     irecv(MailboxPtr chan, void** data);
 
 /** Block the actor until it delivers a message of the given simulated size to the given mailbox
  *
  * See \ref Comm for the full communication API (including non blocking communications).
 */
-XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.") XBT_PUBLIC(void)
-    send(MailboxPtr chan, void* payload, double simulatedSize);
-XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.") XBT_PUBLIC(void)
-    send(MailboxPtr chan, void* payload, double simulatedSize, double timeout);
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.") XBT_PUBLIC
+    void send(MailboxPtr chan, void* payload, double simulatedSize);
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will turn this warning into an error.") XBT_PUBLIC
+    void send(MailboxPtr chan, void* payload, double simulatedSize, double timeout);
 
-XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_async(): v3.20 will turn this warning into an error.") XBT_PUBLIC(CommPtr)
+XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_async(): v3.20 will turn this warning into an error.") XBT_PUBLIC CommPtr
     isend(MailboxPtr chan, void* payload, double simulatedSize);
 
 /** @brief Returns the actor ID of the current actor). */
-XBT_PUBLIC(aid_t) getPid();
+XBT_PUBLIC aid_t getPid();
 
 /** @brief Returns the ancestor's actor ID of the current actor. */
-XBT_PUBLIC(aid_t) getPpid();
+XBT_PUBLIC aid_t getPpid();
 
 /** @brief Returns the name of the current actor. */
-XBT_PUBLIC(std::string) getName();
+XBT_PUBLIC std::string getName();
 
 /** @brief Returns the name of the current actor as a C string. */
-XBT_PUBLIC(const char*) getCname();
+XBT_PUBLIC const char* getCname();
 
 /** @brief Returns the name of the host on which the actor is running. */
-XBT_PUBLIC(Host*) getHost();
+XBT_PUBLIC Host* getHost();
 
 /** @brief Suspend the actor. */
-XBT_PUBLIC(void) suspend();
+XBT_PUBLIC void suspend();
 
 /** @brief yield the actor. */
-XBT_PUBLIC(void) yield();
+XBT_PUBLIC void yield();
 
 /** @brief Resume the actor. */
-XBT_PUBLIC(void) resume();
+XBT_PUBLIC void resume();
 
-XBT_PUBLIC(bool) isSuspended();
+XBT_PUBLIC bool isSuspended();
 
 /** @brief kill the actor. */
-XBT_PUBLIC(void) kill();
+XBT_PUBLIC void kill();
 
 /** @brief Add a function to the list of "on_exit" functions. */
-XBT_PUBLIC(void) onExit(int_f_pvoid_pvoid_t fun, void* data);
+XBT_PUBLIC void onExit(int_f_pvoid_pvoid_t fun, void* data);
 
 /** @brief Migrate the actor to a new host. */
-XBT_PUBLIC(void) migrate(Host* new_host);
+XBT_PUBLIC void migrate(Host* new_host);
 }
 
 /** @} */
index 7c615fe..230e30e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -21,12 +21,11 @@ namespace s4u {
  *
  * Represents all asynchronous communications, that you can test or wait onto.
  */
-XBT_PUBLIC_CLASS Comm : public Activity
-{
+class XBT_PUBLIC Comm : public Activity {
   Comm() : Activity() {}
 public:
-  friend XBT_PUBLIC(void) intrusive_ptr_release(simgrid::s4u::Comm* c);
-  friend XBT_PUBLIC(void) intrusive_ptr_add_ref(simgrid::s4u::Comm* c);
+  friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Comm * c);
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Comm * c);
   friend Mailbox; // Factory of comms
 
   virtual ~Comm();
index 85f4c47..1bd6e11 100644 (file)
@@ -30,8 +30,7 @@ namespace s4u {
  *  semantic. But we currently use (only) double for both durations and
  *  timestamp timeouts.
  */
-XBT_PUBLIC_CLASS ConditionVariable
-{
+class XBT_PUBLIC ConditionVariable {
 private:
   friend s_smx_cond_t;
   smx_cond_t cond_;
@@ -40,8 +39,8 @@ public:
   ConditionVariable(ConditionVariable const&) = delete;
   ConditionVariable& operator=(ConditionVariable const&) = delete;
 
-  friend XBT_PUBLIC(void) intrusive_ptr_add_ref(ConditionVariable * cond);
-  friend XBT_PUBLIC(void) intrusive_ptr_release(ConditionVariable * cond);
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(ConditionVariable * cond);
+  friend XBT_PUBLIC void intrusive_ptr_release(ConditionVariable * cond);
   using Ptr = boost::intrusive_ptr<ConditionVariable>;
 
   static Ptr createConditionVariable();
index cd42aec..232f0f0 100644 (file)
@@ -24,8 +24,7 @@ namespace s4u {
  *
  * This class is an interface to the simulation engine.
  */
-XBT_PUBLIC_CLASS Engine
-{
+class XBT_PUBLIC Engine {
 public:
   /** Constructor, taking the command line parameters of your main function */
   Engine(int* argc, char** argv);
@@ -56,12 +55,17 @@ public:
 
 protected:
   friend s4u::Host;
+  friend s4u::Storage;
   void addHost(std::string name, simgrid::s4u::Host * host);
   void delHost(std::string name);
+  void addStorage(std::string name, simgrid::s4u::Storage * storage);
+  void delStorage(std::string name);
 
 public:
   simgrid::s4u::Host* hostByName(std::string name);
   simgrid::s4u::Host* hostByNameOrNull(std::string name);
+  simgrid::s4u::Storage* storageByName(std::string name);
+  simgrid::s4u::Storage* storageByNameOrNull(std::string name);
 
   size_t getHostCount();
   void getHostList(std::vector<Host*> * whereTo);
@@ -71,6 +75,8 @@ public:
   void getLinkList(std::vector<Link*> * list);
   std::vector<Link*> getAllLinks();
 
+  std::vector<Storage*> getAllStorages();
+
   /** @brief Run the simulation */
   void run();
 
@@ -131,16 +137,16 @@ private:
 
 /** Callback fired when the platform is created (ie, the xml file parsed),
  * right before the actual simulation starts. */
-extern XBT_PUBLIC(xbt::signal<void()>) onPlatformCreated;
+extern XBT_PUBLIC xbt::signal<void()> onPlatformCreated;
 
 /** Callback fired when the main simulation loop ends, just before MSG_run (or similar) ends */
-extern XBT_PUBLIC(xbt::signal<void()>) onSimulationEnd;
+extern XBT_PUBLIC xbt::signal<void()> onSimulationEnd;
 
 /** Callback fired when the time jumps into the future */
-extern XBT_PUBLIC(xbt::signal<void(double)>) onTimeAdvance;
+extern XBT_PUBLIC xbt::signal<void(double)> onTimeAdvance;
 
 /** Callback fired when the time cannot jump because of inter-actors deadlock */
-extern XBT_PUBLIC(xbt::signal<void(void)>) onDeadlock;
+extern XBT_PUBLIC xbt::signal<void(void)> onDeadlock;
 
 template <class T> XBT_PRIVATE void netzoneByTypeRecursive(s4u::NetZone* current, std::vector<T*>* whereto)
 {
index 650ea7f..43a0031 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-2018. 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. */
 namespace simgrid {
 namespace s4u {
 
-XBT_PUBLIC_CLASS Exec : public Activity
-{
+class XBT_PUBLIC Exec : public Activity {
   Exec() : Activity() {}
 public:
-  friend XBT_PUBLIC(void) intrusive_ptr_release(simgrid::s4u::Exec* e);
-  friend XBT_PUBLIC(void) intrusive_ptr_add_ref(simgrid::s4u::Exec* e);
-  friend XBT_PUBLIC(ExecPtr) this_actor::exec_init(double flops_amount);
+  friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Exec * e);
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Exec * e);
+  friend XBT_PUBLIC ExecPtr this_actor::exec_init(double flops_amount);
 
   ~Exec() = default;
 
index 986744b..092908e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -20,7 +20,7 @@
 namespace simgrid {
 
 namespace xbt {
-extern template class XBT_PUBLIC() Extendable<simgrid::s4u::Host>;
+extern template class XBT_PUBLIC Extendable<simgrid::s4u::Host>;
 }
 namespace s4u {
 
@@ -37,8 +37,7 @@ namespace s4u {
  * You can retrieve a particular host using simgrid::s4u::Host::byName()
  * and actors can retrieve the host on which they run using simgrid::s4u::Host::current().
  */
-XBT_PUBLIC_CLASS Host : public simgrid::xbt::Extendable<Host>
-{
+class XBT_PUBLIC Host : public simgrid::xbt::Extendable<Host> {
 
 public:
   explicit Host(const char* name);
index 13619bc..8376304 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -23,8 +23,7 @@ class NetworkAction;
 };
 namespace s4u {
 /** @brief A Link represents the network facilities between [hosts](\ref simgrid::s4u::Host) */
-XBT_PUBLIC_CLASS Link : public simgrid::xbt::Extendable<Link>
-{
+class XBT_PUBLIC Link : public simgrid::xbt::Extendable<Link> {
   friend simgrid::surf::LinkImpl;
 
   // Links are created from the NetZone, and destroyed by their private implementation when the simulation ends
index 4b6a905..642ce4a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -104,7 +104,7 @@ namespace s4u {
  *
  * @section s4u_mb_api The API
  */
-XBT_PUBLIC_CLASS Mailbox {
+class XBT_PUBLIC Mailbox {
   friend Comm;
   friend simgrid::kernel::activity::MailboxImpl;
 
index 81263d9..6d58988 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -33,7 +33,7 @@ class ConditionVariable;
  * Use createMutex() to get a ::MutexPtr to a newly created mutex and only manipulate ::MutexPtr.
  *
  */
-XBT_PUBLIC_CLASS Mutex {
+class XBT_PUBLIC Mutex {
   friend ConditionVariable;
   friend simgrid::kernel::activity::MutexImpl;
   simgrid::kernel::activity::MutexImpl* mutex_;
index 778d179..a1935b7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2016-2018. 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. */
@@ -28,8 +28,7 @@ namespace s4u {
  * netzones. In SimGrid, there is a hierarchy of netzones, with a unique root zone (that you can retrieve from the
  * s4u::Engine).
  */
-XBT_PUBLIC_CLASS NetZone
-{
+class XBT_PUBLIC NetZone {
 protected:
   friend simgrid::kernel::routing::NetZoneImpl;
 
index 571c3b1..5366365 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2015, 2017. The SimGrid Team.
+/* Copyright (c) 2006-2015, 2017-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 
 namespace simgrid {
 namespace xbt {
-extern template class XBT_PUBLIC() Extendable<simgrid::s4u::Storage>;
+extern template class XBT_PUBLIC Extendable<simgrid::s4u::Storage>;
 }
 namespace s4u {
 
-XBT_ATTRIB_PUBLIC void getStorageList(std::map<std::string, Storage*>* whereTo);
+XBT_PUBLIC void getStorageList(std::map<std::string, Storage*>* whereTo);
 
-XBT_PUBLIC_CLASS Storage : public simgrid::xbt::Extendable<Storage>
-{
+class XBT_PUBLIC Storage : public simgrid::xbt::Extendable<Storage> {
   friend s4u::Engine;
   friend simgrid::surf::StorageImpl;
 
 public:
-  explicit Storage(surf::StorageImpl * pimpl) : pimpl_(pimpl) {}
+  explicit Storage(std::string name, surf::StorageImpl * pimpl);
   virtual ~Storage() = default;
   /** Retrieve a Storage by its name. It must exist in the platform file */
   static Storage* byName(std::string name);
index 2ec81c7..ea9aff0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2018. 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. */
@@ -31,8 +31,7 @@ namespace s4u {
  * The total computing power that the contained actors can get is constrained to the virtual machine size.
  *
  */
-XBT_PUBLIC_CLASS VirtualMachine : public s4u::Host
-{
+class XBT_PUBLIC VirtualMachine : public s4u::Host {
   simgrid::vm::VirtualMachineImpl* pimpl_vm_ = nullptr;
   virtual ~VirtualMachine();
 
index e55df1f..233e195 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2016-2018. 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. */
@@ -15,19 +15,19 @@ namespace s4u {
 class Activity;
 class Actor;
 using ActorPtr = boost::intrusive_ptr<Actor>;
-XBT_PUBLIC(void) intrusive_ptr_release(Actor* actor);
-XBT_PUBLIC(void) intrusive_ptr_add_ref(Actor* actor);
+XBT_PUBLIC void intrusive_ptr_release(Actor* actor);
+XBT_PUBLIC void intrusive_ptr_add_ref(Actor* actor);
 
 class Comm;
 using CommPtr = boost::intrusive_ptr<Comm>;
-XBT_PUBLIC(void) intrusive_ptr_release(Comm* c);
-XBT_PUBLIC(void) intrusive_ptr_add_ref(Comm* c);
+XBT_PUBLIC void intrusive_ptr_release(Comm* c);
+XBT_PUBLIC void intrusive_ptr_add_ref(Comm* c);
 
 class Engine;
 class Exec;
 using ExecPtr = boost::intrusive_ptr<Exec>;
-XBT_PUBLIC(void) intrusive_ptr_release(Exec* e);
-XBT_PUBLIC(void) intrusive_ptr_add_ref(Exec* e);
+XBT_PUBLIC void intrusive_ptr_release(Exec* e);
+XBT_PUBLIC void intrusive_ptr_add_ref(Exec* e);
 
 class Host;
 class Link;
index 4c044a5..9194eab 100644 (file)
@@ -70,46 +70,45 @@ typedef enum {
  *  @see SD_task_t, @see SD_task_dependency_api
  *  @{
  */
-XBT_PUBLIC(SD_task_t) SD_task_create(const char *name, void *data, double amount);
-XBT_PUBLIC(void *) SD_task_get_data(SD_task_t task);
-XBT_PUBLIC(void) SD_task_set_data(SD_task_t task, void *data);
-XBT_PUBLIC(e_SD_task_state_t) SD_task_get_state(SD_task_t task);
-XBT_PUBLIC(const char *) SD_task_get_name(SD_task_t task);
-XBT_PUBLIC(void) SD_task_set_name(SD_task_t task, const char *name);
-XBT_PUBLIC(void) SD_task_set_rate(SD_task_t task, double rate);
-
-XBT_PUBLIC(void) SD_task_watch(SD_task_t task, e_SD_task_state_t state);
-XBT_PUBLIC(void) SD_task_unwatch(SD_task_t task, e_SD_task_state_t state);
-XBT_PUBLIC(double) SD_task_get_amount(SD_task_t task);
-XBT_PUBLIC(void) SD_task_set_amount(SD_task_t task, double amount);
-XBT_PUBLIC(double) SD_task_get_alpha(SD_task_t task);
-XBT_PUBLIC(double) SD_task_get_remaining_amount(SD_task_t task);
-XBT_PUBLIC(double) SD_task_get_execution_time(SD_task_t task, int host_count, const sg_host_t *host_list,
-                                              const double *flops_amount, const double *bytes_amount);
-XBT_PUBLIC(e_SD_task_kind_t) SD_task_get_kind(SD_task_t task);
-XBT_PUBLIC(void) SD_task_schedule(SD_task_t task, int host_count, const sg_host_t *host_list,
-                                  const double *flops_amount, const double *bytes_amount, double rate);
-XBT_PUBLIC(void) SD_task_unschedule(SD_task_t task);
-XBT_PUBLIC(double) SD_task_get_start_time(SD_task_t task);
-XBT_PUBLIC(double) SD_task_get_finish_time(SD_task_t task);
-XBT_PUBLIC(xbt_dynar_t) SD_task_get_parents(SD_task_t task);
-XBT_PUBLIC(xbt_dynar_t) SD_task_get_children(SD_task_t task);
-XBT_PUBLIC(int) SD_task_get_workstation_count(SD_task_t task);
-XBT_PUBLIC(sg_host_t *) SD_task_get_workstation_list(SD_task_t task);
-XBT_PUBLIC(void) SD_task_destroy(SD_task_t task);
-XBT_PUBLIC(void) SD_task_dump(SD_task_t task);
-XBT_PUBLIC(void) SD_task_dotty(SD_task_t task, void *out_FILE);
-
-XBT_PUBLIC(SD_task_t) SD_task_create_comp_seq(const char *name, void *data, double amount);
-XBT_PUBLIC(SD_task_t) SD_task_create_comp_par_amdahl(const char *name, void *data, double amount, double alpha);
-XBT_PUBLIC(SD_task_t) SD_task_create_comm_e2e(const char *name, void *data, double amount);
-XBT_PUBLIC(SD_task_t) SD_task_create_comm_par_mxn_1d_block(const char *name, void *data, double amount);
-
-XBT_PUBLIC(void) SD_task_distribute_comp_amdahl(SD_task_t task, int ws_count);
-XBT_PUBLIC(void) SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb);
-XBT_PUBLIC(void) SD_task_schedulev(SD_task_t task, int count, const sg_host_t * list);
-XBT_PUBLIC(void) SD_task_schedulel(SD_task_t task, int count, ...);
-
+XBT_PUBLIC SD_task_t SD_task_create(const char* name, void* data, double amount);
+XBT_PUBLIC void* SD_task_get_data(SD_task_t task);
+XBT_PUBLIC void SD_task_set_data(SD_task_t task, void* data);
+XBT_PUBLIC e_SD_task_state_t SD_task_get_state(SD_task_t task);
+XBT_PUBLIC const char* SD_task_get_name(SD_task_t task);
+XBT_PUBLIC void SD_task_set_name(SD_task_t task, const char* name);
+XBT_PUBLIC void SD_task_set_rate(SD_task_t task, double rate);
+
+XBT_PUBLIC void SD_task_watch(SD_task_t task, e_SD_task_state_t state);
+XBT_PUBLIC void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state);
+XBT_PUBLIC double SD_task_get_amount(SD_task_t task);
+XBT_PUBLIC void SD_task_set_amount(SD_task_t task, double amount);
+XBT_PUBLIC double SD_task_get_alpha(SD_task_t task);
+XBT_PUBLIC double SD_task_get_remaining_amount(SD_task_t task);
+XBT_PUBLIC double SD_task_get_execution_time(SD_task_t task, int host_count, const sg_host_t* host_list,
+                                             const double* flops_amount, const double* bytes_amount);
+XBT_PUBLIC e_SD_task_kind_t SD_task_get_kind(SD_task_t task);
+XBT_PUBLIC void SD_task_schedule(SD_task_t task, int host_count, const sg_host_t* host_list, const double* flops_amount,
+                                 const double* bytes_amount, double rate);
+XBT_PUBLIC void SD_task_unschedule(SD_task_t task);
+XBT_PUBLIC double SD_task_get_start_time(SD_task_t task);
+XBT_PUBLIC double SD_task_get_finish_time(SD_task_t task);
+XBT_PUBLIC xbt_dynar_t SD_task_get_parents(SD_task_t task);
+XBT_PUBLIC xbt_dynar_t SD_task_get_children(SD_task_t task);
+XBT_PUBLIC int SD_task_get_workstation_count(SD_task_t task);
+XBT_PUBLIC sg_host_t* SD_task_get_workstation_list(SD_task_t task);
+XBT_PUBLIC void SD_task_destroy(SD_task_t task);
+XBT_PUBLIC void SD_task_dump(SD_task_t task);
+XBT_PUBLIC void SD_task_dotty(SD_task_t task, void* out_FILE);
+
+XBT_PUBLIC SD_task_t SD_task_create_comp_seq(const char* name, void* data, double amount);
+XBT_PUBLIC SD_task_t SD_task_create_comp_par_amdahl(const char* name, void* data, double amount, double alpha);
+XBT_PUBLIC SD_task_t SD_task_create_comm_e2e(const char* name, void* data, double amount);
+XBT_PUBLIC SD_task_t SD_task_create_comm_par_mxn_1d_block(const char* name, void* data, double amount);
+
+XBT_PUBLIC void SD_task_distribute_comp_amdahl(SD_task_t task, int ws_count);
+XBT_PUBLIC void SD_task_build_MxN_1D_block_matrix(SD_task_t task, int src_nb, int dst_nb);
+XBT_PUBLIC void SD_task_schedulev(SD_task_t task, int count, const sg_host_t* list);
+XBT_PUBLIC void SD_task_schedulel(SD_task_t task, int count, ...);
 
 /** @brief A constant to use in SD_task_schedule to mean that there is no cost.
  *
@@ -128,9 +127,9 @@ XBT_PUBLIC(void) SD_task_schedulel(SD_task_t task, int count, ...);
  *  @see SD_task_api
  *  @{
  */
-XBT_PUBLIC(void) SD_task_dependency_add(SD_task_t src, SD_task_t dst);
-XBT_PUBLIC(void) SD_task_dependency_remove(SD_task_t src, SD_task_t dst);
-XBT_PUBLIC(int) SD_task_dependency_exists(SD_task_t src, SD_task_t dst);
+XBT_PUBLIC void SD_task_dependency_add(SD_task_t src, SD_task_t dst);
+XBT_PUBLIC void SD_task_dependency_remove(SD_task_t src, SD_task_t dst);
+XBT_PUBLIC int SD_task_dependency_exists(SD_task_t src, SD_task_t dst);
 /** @} */
 
 /************************** Global *******************************************/
@@ -147,17 +146,17 @@ XBT_PUBLIC(int) SD_task_dependency_exists(SD_task_t src, SD_task_t dst);
     SD_init_nocheck(argc, argv);                                                                                       \
   } while (0)
 
-XBT_PUBLIC(void) SD_init_nocheck(int *argc, char **argv);
-XBT_PUBLIC(void) SD_config(const char *key, const char *value);
-XBT_PUBLIC(void) SD_create_environment(const char *platform_file);
-XBT_PUBLIC(void) SD_simulate(double how_long);
-XBT_PUBLIC(void) SD_simulate_with_update(double how_long, xbt_dynar_t changed_tasks_dynar);
-XBT_PUBLIC(double) SD_get_clock();
-XBT_PUBLIC(void) SD_exit();
-XBT_PUBLIC(xbt_dynar_t) SD_daxload(const char *filename);
-XBT_PUBLIC(xbt_dynar_t) SD_dotload(const char *filename);
-XBT_PUBLIC(xbt_dynar_t) SD_dotload_with_sched(const char *filename);
-XBT_PUBLIC(xbt_dynar_t) SD_PTG_dotload(const char *filename);
+XBT_PUBLIC void SD_init_nocheck(int* argc, char** argv);
+XBT_PUBLIC void SD_config(const char* key, const char* value);
+XBT_PUBLIC void SD_create_environment(const char* platform_file);
+XBT_PUBLIC void SD_simulate(double how_long);
+XBT_PUBLIC void SD_simulate_with_update(double how_long, xbt_dynar_t changed_tasks_dynar);
+XBT_PUBLIC double SD_get_clock();
+XBT_PUBLIC void SD_exit();
+XBT_PUBLIC xbt_dynar_t SD_daxload(const char* filename);
+XBT_PUBLIC xbt_dynar_t SD_dotload(const char* filename);
+XBT_PUBLIC xbt_dynar_t SD_dotload_with_sched(const char* filename);
+XBT_PUBLIC xbt_dynar_t SD_PTG_dotload(const char* filename);
 /** @} */
 
 /* Support some backward compatibility */
@@ -200,7 +199,7 @@ SG_END_DECL()
 #ifdef __cplusplus
 namespace simgrid {
 namespace sd {
-XBT_PUBLIC(std::set<SD_task_t>*) simulate(double how_long);
+XBT_PUBLIC std::set<SD_task_t>* simulate(double how_long);
 }
 }
 #endif
index 56c2f33..5c2e970 100644 (file)
@@ -74,61 +74,57 @@ extern int smx_context_guard_size_was_set;
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(smx_actor_t) SIMIX_process_from_PID(aid_t PID);
+XBT_PUBLIC smx_actor_t SIMIX_process_from_PID(aid_t PID);
 
 /* parallelism */
-XBT_PUBLIC(int) SIMIX_context_is_parallel();
-XBT_PUBLIC(int) SIMIX_context_get_nthreads();
-XBT_PUBLIC(void) SIMIX_context_set_nthreads(int nb_threads);
-XBT_PUBLIC(int) SIMIX_context_get_parallel_threshold();
-XBT_PUBLIC(void) SIMIX_context_set_parallel_threshold(int threshold);
-XBT_PUBLIC(e_xbt_parmap_mode_t) SIMIX_context_get_parallel_mode();
-XBT_PUBLIC(void) SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode);
-XBT_PUBLIC(int) SIMIX_is_maestro();
-
+XBT_PUBLIC int SIMIX_context_is_parallel();
+XBT_PUBLIC int SIMIX_context_get_nthreads();
+XBT_PUBLIC void SIMIX_context_set_nthreads(int nb_threads);
+XBT_PUBLIC int SIMIX_context_get_parallel_threshold();
+XBT_PUBLIC void SIMIX_context_set_parallel_threshold(int threshold);
+XBT_PUBLIC e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode();
+XBT_PUBLIC void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode);
+XBT_PUBLIC int SIMIX_is_maestro();
 
 /********************************** Global ************************************/
 /* Initialization and exit */
-XBT_PUBLIC(void) SIMIX_global_init(int *argc, char **argv);
+XBT_PUBLIC void SIMIX_global_init(int* argc, char** argv);
 
 /* Set to execute in the maestro
  *
  * If no maestro code is registered (the default), the main thread
  * is assumed to be the maestro. */
-XBT_PUBLIC(void) SIMIX_set_maestro(void (*code)(void*), void* data);
+XBT_PUBLIC void SIMIX_set_maestro(void (*code)(void*), void* data);
 
-XBT_PUBLIC(void) SIMIX_function_register_process_cleanup(void_pfn_smxprocess_t function);
-XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_pfn_smxprocess_t function);
+XBT_PUBLIC void SIMIX_function_register_process_cleanup(void_pfn_smxprocess_t function);
+XBT_PUBLIC void SIMIX_function_register_process_kill(void_pfn_smxprocess_t function);
 
 /* Simulation execution */
-XBT_PUBLIC(void) SIMIX_run();
-XBT_PUBLIC(double) SIMIX_get_clock();
+XBT_PUBLIC void SIMIX_run();
+XBT_PUBLIC double SIMIX_get_clock();
 
 /* Timer functions FIXME: should these be public? */
 typedef struct s_smx_timer_t* smx_timer_t;
 
-XBT_PUBLIC(smx_timer_t) SIMIX_timer_set(double date, void (*function)(void*), void *arg);
-XBT_PUBLIC(void) SIMIX_timer_remove(smx_timer_t timer);
-XBT_PUBLIC(double) SIMIX_timer_next();
-XBT_PUBLIC(double) SIMIX_timer_get_date(smx_timer_t timer);
+XBT_PUBLIC smx_timer_t SIMIX_timer_set(double date, void (*function)(void*), void* arg);
+XBT_PUBLIC void SIMIX_timer_remove(smx_timer_t timer);
+XBT_PUBLIC double SIMIX_timer_next();
+XBT_PUBLIC double SIMIX_timer_get_date(smx_timer_t timer);
 
-XBT_PUBLIC(void) SIMIX_display_process_status();
+XBT_PUBLIC void SIMIX_display_process_status();
 
 /******************************* Environment **********************************/
-XBT_PUBLIC(void) SIMIX_create_environment(const char *file);
+XBT_PUBLIC void SIMIX_create_environment(const char* file);
 
 /******************************** Deployment **********************************/
 
-XBT_PUBLIC(void) SIMIX_function_register(const char *name, xbt_main_func_t code);
-XBT_PUBLIC(void) SIMIX_function_register_default(xbt_main_func_t code);
-XBT_PUBLIC(void) SIMIX_init_application();
-XBT_PUBLIC(void) SIMIX_launch_application(const char *file);
+XBT_PUBLIC void SIMIX_function_register(const char* name, xbt_main_func_t code);
+XBT_PUBLIC void SIMIX_function_register_default(xbt_main_func_t code);
+XBT_PUBLIC void SIMIX_init_application();
+XBT_PUBLIC void SIMIX_launch_application(const char* file);
 
-XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host,
-                                            const char *process_function,
-                                            xbt_dynar_t arguments,
-                                            double process_start_time,
-                                            double process_kill_time);
+XBT_PUBLIC void SIMIX_process_set_function(const char* process_host, const char* process_function,
+                                           xbt_dynar_t arguments, double process_start_time, double process_kill_time);
 
 /*********************************** Host *************************************/
 /* Functions for running a process in main()
@@ -139,35 +135,34 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host,
  *  4. detach (this waits for the simulation to terminate)
  */
 
-XBT_PUBLIC(void) SIMIX_maestro_create(void (*code)(void*), void* data);
+XBT_PUBLIC void SIMIX_maestro_create(void (*code)(void*), void* data);
 #ifdef __cplusplus
-XBT_PUBLIC(smx_actor_t)
-SIMIX_process_attach(const char* name, void* data, const char* hostname, std::map<std::string, std::string>* properties,
-                     smx_actor_t parent_process);
+XBT_PUBLIC smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostname,
+                                            std::map<std::string, std::string>* properties, smx_actor_t parent_process);
 #endif
-XBT_PUBLIC(void) SIMIX_process_detach();
+XBT_PUBLIC void SIMIX_process_detach();
 
 /*********************************** Host *************************************/
-XBT_PUBLIC(void) SIMIX_host_off(sg_host_t host, smx_actor_t issuer);
+XBT_PUBLIC void SIMIX_host_off(sg_host_t host, smx_actor_t issuer);
 
 /********************************* Process ************************************/
-XBT_PUBLIC(int) SIMIX_process_count();
-XBT_PUBLIC(smx_actor_t) SIMIX_process_self();
-XBT_PUBLIC(const char*) SIMIX_process_self_get_name();
-XBT_PUBLIC(void) SIMIX_process_self_set_data(void *data);
-XBT_PUBLIC(void*) SIMIX_process_self_get_data();
-XBT_PUBLIC(int) SIMIX_process_has_pending_comms(smx_actor_t process);
-XBT_PUBLIC(void) SIMIX_process_on_exit_runall(smx_actor_t process);
-XBT_PUBLIC(void) SIMIX_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data);
+XBT_PUBLIC int SIMIX_process_count();
+XBT_PUBLIC smx_actor_t SIMIX_process_self();
+XBT_PUBLIC const char* SIMIX_process_self_get_name();
+XBT_PUBLIC void SIMIX_process_self_set_data(void* data);
+XBT_PUBLIC void* SIMIX_process_self_get_data();
+XBT_PUBLIC int SIMIX_process_has_pending_comms(smx_actor_t process);
+XBT_PUBLIC void SIMIX_process_on_exit_runall(smx_actor_t process);
+XBT_PUBLIC void SIMIX_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data);
 
 SG_END_DECL()
 
 /****************************** Communication *********************************/
-XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_activity_t, void*, size_t));
-XBT_PUBLIC(void) SIMIX_comm_copy_pointer_callback(smx_activity_t comm, void* buff, size_t buff_size);
-XBT_PUBLIC(void) SIMIX_comm_copy_buffer_callback(smx_activity_t comm, void* buff, size_t buff_size);
+XBT_PUBLIC void SIMIX_comm_set_copy_data_callback(void (*callback)(smx_activity_t, void*, size_t));
+XBT_PUBLIC void SIMIX_comm_copy_pointer_callback(smx_activity_t comm, void* buff, size_t buff_size);
+XBT_PUBLIC void SIMIX_comm_copy_buffer_callback(smx_activity_t comm, void* buff, size_t buff_size);
 
-XBT_PUBLIC(void) SIMIX_comm_finish(smx_activity_t synchro);
+XBT_PUBLIC void SIMIX_comm_finish(smx_activity_t synchro);
 
 /******************************************************************************/
 /*                            SIMIX simcalls                                  */
@@ -176,112 +171,112 @@ XBT_PUBLIC(void) SIMIX_comm_finish(smx_activity_t synchro);
 /* They can also be called from maestro's context, and they are thread safe.  */
 /******************************************************************************/
 
-XBT_PUBLIC(void) simcall_call(smx_actor_t process);
+XBT_PUBLIC void simcall_call(smx_actor_t process);
 
 /******************************* Host simcalls ********************************/
-XBT_PUBLIC(smx_activity_t)
-simcall_execution_start(const char* name, double flops_amount, double priority, double bound, sg_host_t host);
-XBT_PUBLIC(smx_activity_t)
-simcall_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount,
-                                 double* bytes_amount, double rate, double timeout);
-XBT_PUBLIC(void) simcall_execution_cancel(smx_activity_t execution);
-XBT_PUBLIC(void) simcall_execution_set_priority(smx_activity_t execution, double priority);
-XBT_PUBLIC(void) simcall_execution_set_bound(smx_activity_t execution, double bound);
-XBT_PUBLIC(e_smx_state_t) simcall_execution_wait(smx_activity_t execution);
-XBT_PUBLIC(e_smx_state_t) simcall_execution_test(smx_activity_t execution);
+XBT_PUBLIC smx_activity_t simcall_execution_start(const char* name, double flops_amount, double priority, double bound,
+                                                  sg_host_t host);
+XBT_PUBLIC smx_activity_t simcall_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list,
+                                                           double* flops_amount, double* bytes_amount, double rate,
+                                                           double timeout);
+XBT_PUBLIC void simcall_execution_cancel(smx_activity_t execution);
+XBT_PUBLIC void simcall_execution_set_priority(smx_activity_t execution, double priority);
+XBT_PUBLIC void simcall_execution_set_bound(smx_activity_t execution, double bound);
+XBT_PUBLIC e_smx_state_t simcall_execution_wait(smx_activity_t execution);
+XBT_PUBLIC e_smx_state_t simcall_execution_test(smx_activity_t execution);
 
 /**************************** Process simcalls ********************************/
 SG_BEGIN_DECL()
 /* Constructor and Destructor */
 #ifdef __cplusplus
-XBT_PUBLIC(smx_actor_t)
-simcall_process_create(const char* name, xbt_main_func_t code, void* data, sg_host_t host, int argc, char** argv,
-                       std::map<std::string, std::string>* properties);
+XBT_PUBLIC smx_actor_t simcall_process_create(const char* name, xbt_main_func_t code, void* data, sg_host_t host,
+                                              int argc, char** argv, std::map<std::string, std::string>* properties);
 #endif
 
-XBT_PUBLIC(void) simcall_process_killall(int reset_pid);
-XBT_PUBLIC(void) SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const char *msg);
-
+XBT_PUBLIC void simcall_process_killall();
+XBT_PUBLIC void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const char* msg);
 
 /* Process handling */
-XBT_PUBLIC(void) simcall_process_cleanup(smx_actor_t process);
-XBT_PUBLIC(void) simcall_process_suspend(smx_actor_t process);
+XBT_PUBLIC void simcall_process_cleanup(smx_actor_t process);
+XBT_PUBLIC void simcall_process_suspend(smx_actor_t process);
 
 /* Getters and Setters */
-XBT_PUBLIC(int) simcall_process_count();
-XBT_PUBLIC(void) simcall_process_set_data(smx_actor_t process, void *data);
-XBT_PUBLIC(void) simcall_process_set_kill_time(smx_actor_t process, double kill_time);
-XBT_PUBLIC(void) simcall_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data);
-XBT_PUBLIC(void) simcall_process_join(smx_actor_t process, double timeout);
+XBT_PUBLIC int simcall_process_count();
+XBT_PUBLIC void simcall_process_set_data(smx_actor_t process, void* data);
+XBT_PUBLIC void simcall_process_set_kill_time(smx_actor_t process, double kill_time);
+XBT_PUBLIC void simcall_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data);
+XBT_PUBLIC void simcall_process_join(smx_actor_t process, double timeout);
 /* Sleep control */
-XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration);
+XBT_PUBLIC e_smx_state_t simcall_process_sleep(double duration);
 SG_END_DECL()
 
 /************************** Comunication simcalls *****************************/
 
 #ifdef __cplusplus
-XBT_PUBLIC(void)
-simcall_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff,
-                  size_t src_buff_size, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                  void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, double timeout);
-
-XBT_PUBLIC(smx_activity_t)
-simcall_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff,
-                   size_t src_buff_size, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                   void (*clean_fun)(void*), void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data,
-                   int detached);
-
-XBT_PUBLIC(void)
-simcall_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size,
-                  int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                  void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, double timeout, double rate);
-
-XBT_PUBLIC(smx_activity_t)
-simcall_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size,
-                   int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                   void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, double rate);
-
-XBT_PUBLIC(smx_activity_t)
-simcall_comm_iprobe(smx_mailbox_t mbox, int type, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                    void* data);
+XBT_PUBLIC void simcall_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff,
+                                  size_t src_buff_size,
+                                  int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+                                  void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, double timeout);
+
+XBT_PUBLIC smx_activity_t simcall_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate,
+                                             void* src_buff, size_t src_buff_size,
+                                             int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+                                             void (*clean_fun)(void*),
+                                             void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data,
+                                             int detached);
+
+XBT_PUBLIC void simcall_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size,
+                                  int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+                                  void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, double timeout,
+                                  double rate);
+
+XBT_PUBLIC smx_activity_t simcall_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff,
+                                             size_t* dst_buff_size,
+                                             int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+                                             void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data,
+                                             double rate);
+
+XBT_PUBLIC smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type,
+                                              int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+                                              void* data);
 #endif
-XBT_PUBLIC(void) simcall_comm_cancel(smx_activity_t comm);
+XBT_PUBLIC void simcall_comm_cancel(smx_activity_t comm);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
-XBT_PUBLIC(unsigned int) simcall_comm_waitany(xbt_dynar_t comms, double timeout);
-XBT_PUBLIC(void) simcall_comm_wait(smx_activity_t comm, double timeout);
-XBT_PUBLIC(int) simcall_comm_test(smx_activity_t comm);
-XBT_PUBLIC(int) simcall_comm_testany(smx_activity_t* comms, size_t count);
+XBT_PUBLIC unsigned int simcall_comm_waitany(xbt_dynar_t comms, double timeout);
+XBT_PUBLIC void simcall_comm_wait(smx_activity_t comm, double timeout);
+XBT_PUBLIC int simcall_comm_test(smx_activity_t comm);
+XBT_PUBLIC int simcall_comm_testany(smx_activity_t* comms, size_t count);
 
 /************************** Tracing handling **********************************/
-XBT_PUBLIC(void) simcall_set_category(smx_activity_t synchro, const char *category);
+XBT_PUBLIC void simcall_set_category(smx_activity_t synchro, const char* category);
 
 /************************** Synchro simcalls **********************************/
 SG_BEGIN_DECL()
-XBT_PUBLIC(smx_mutex_t) simcall_mutex_init();
-XBT_PUBLIC(smx_mutex_t) SIMIX_mutex_ref(smx_mutex_t mutex);
-XBT_PUBLIC(void) SIMIX_mutex_unref(smx_mutex_t mutex);
-XBT_PUBLIC(void) simcall_mutex_lock(smx_mutex_t mutex);
-XBT_PUBLIC(int) simcall_mutex_trylock(smx_mutex_t mutex);
-XBT_PUBLIC(void) simcall_mutex_unlock(smx_mutex_t mutex);
-
-XBT_PUBLIC(smx_cond_t) simcall_cond_init();
-XBT_PUBLIC(void) SIMIX_cond_unref(smx_cond_t cond);
-XBT_PUBLIC(smx_cond_t) SIMIX_cond_ref(smx_cond_t cond);
-XBT_PUBLIC(void) simcall_cond_signal(smx_cond_t cond);
-XBT_PUBLIC(void) simcall_cond_wait(smx_cond_t cond, smx_mutex_t mutex);
-XBT_PUBLIC(void) simcall_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double max_duration);
-XBT_PUBLIC(void) simcall_cond_broadcast(smx_cond_t cond);
-
-XBT_PUBLIC(void) SIMIX_sem_destroy(smx_sem_t sem);
-XBT_PUBLIC(void) simcall_sem_acquire(smx_sem_t sem);
-XBT_PUBLIC(void) simcall_sem_acquire_timeout(smx_sem_t sem, double max_duration);
+XBT_PUBLIC smx_mutex_t simcall_mutex_init();
+XBT_PUBLIC smx_mutex_t SIMIX_mutex_ref(smx_mutex_t mutex);
+XBT_PUBLIC void SIMIX_mutex_unref(smx_mutex_t mutex);
+XBT_PUBLIC void simcall_mutex_lock(smx_mutex_t mutex);
+XBT_PUBLIC int simcall_mutex_trylock(smx_mutex_t mutex);
+XBT_PUBLIC void simcall_mutex_unlock(smx_mutex_t mutex);
+
+XBT_PUBLIC smx_cond_t simcall_cond_init();
+XBT_PUBLIC void SIMIX_cond_unref(smx_cond_t cond);
+XBT_PUBLIC smx_cond_t SIMIX_cond_ref(smx_cond_t cond);
+XBT_PUBLIC void simcall_cond_signal(smx_cond_t cond);
+XBT_PUBLIC void simcall_cond_wait(smx_cond_t cond, smx_mutex_t mutex);
+XBT_PUBLIC void simcall_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double max_duration);
+XBT_PUBLIC void simcall_cond_broadcast(smx_cond_t cond);
+
+XBT_PUBLIC void SIMIX_sem_destroy(smx_sem_t sem);
+XBT_PUBLIC void simcall_sem_acquire(smx_sem_t sem);
+XBT_PUBLIC void simcall_sem_acquire_timeout(smx_sem_t sem, double max_duration);
 
 /*****************************   Storage   **********************************/
-XBT_PUBLIC(sg_size_t) simcall_storage_read(surf_storage_t st, sg_size_t size);
-XBT_PUBLIC(sg_size_t) simcall_storage_write(surf_storage_t fd, sg_size_t size);
+XBT_PUBLIC sg_size_t simcall_storage_read(surf_storage_t st, sg_size_t size);
+XBT_PUBLIC sg_size_t simcall_storage_write(surf_storage_t fd, sg_size_t size);
 /************************** MC simcalls   **********************************/
-XBT_PUBLIC(int) simcall_mc_random(int min, int max);
+XBT_PUBLIC int simcall_mc_random(int min, int max);
 
 SG_END_DECL()
 
index f21fa3d..0eb3375 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2010, 2012-2017. The SimGrid Team.
+/* Copyright (c) 2007-2010, 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -15,7 +15,7 @@
 #include <map>
 #include <string>
 
-XBT_PUBLIC(void) simcall_run_kernel(std::function<void()> const& code);
+XBT_PUBLIC void simcall_run_kernel(std::function<void()> const& code);
 
 /** Execute some code in the kernel and block
  *
@@ -26,7 +26,7 @@ XBT_PUBLIC(void) simcall_run_kernel(std::function<void()> const& code);
  *
  * @ref simix::kernelSync() is a higher level wrapper for this.
  */
-XBT_PUBLIC(void) simcall_run_blocking(std::function<void()> const& code);
+XBT_PUBLIC void simcall_run_blocking(std::function<void()> const& code);
 
 template<class F> inline
 void simcall_run_kernel(F& f)
@@ -69,10 +69,10 @@ typename std::result_of<F()>::type kernelImmediate(F&& code)
   return result.get();
 }
 
-XBT_PUBLIC(const std::vector<smx_actor_t>&) process_get_runnable();
+XBT_PUBLIC const std::vector<smx_actor_t>& process_get_runnable();
 
-XBT_PUBLIC(void) set_maestro(std::function<void()> code);
-XBT_PUBLIC(void) create_maestro(std::function<void()> code);
+XBT_PUBLIC void set_maestro(std::function<void()> code);
+XBT_PUBLIC void create_maestro(std::function<void()> code);
 
 // What's executed as SIMIX actor code:
 typedef std::function<void()> ActorCode;
@@ -80,7 +80,7 @@ typedef std::function<void()> ActorCode;
 // Create ActorCode based on argv:
 typedef std::function<ActorCode(std::vector<std::string> args)> ActorCodeFactory;
 
-XBT_PUBLIC(void) registerFunction(const char* name, ActorCodeFactory factory);
+XBT_PUBLIC void registerFunction(const char* name, ActorCodeFactory factory);
 
 /** These functions will be called when we detect a deadlock: any remaining process is locked on an action
  *
@@ -108,14 +108,12 @@ typedef smx_actor_t (*smx_creation_func_t)(
     /* props */ std::map<std::string, std::string>*,
     /* parent_process */ smx_actor_t);
 
-extern "C"
-XBT_PUBLIC(void) SIMIX_function_register_process_create(smx_creation_func_t function);
+extern "C" XBT_PUBLIC void SIMIX_function_register_process_create(smx_creation_func_t function);
 
-XBT_PUBLIC(smx_actor_t)
-simcall_process_create(const char* name, std::function<void()> code, void* data, sg_host_t host,
-                       std::map<std::string, std::string>* properties);
+XBT_PUBLIC smx_actor_t simcall_process_create(const char* name, std::function<void()> code, void* data, sg_host_t host,
+                                              std::map<std::string, std::string>* properties);
 
-XBT_PUBLIC(smx_timer_t) SIMIX_timer_set(double date, simgrid::xbt::Task<void()> callback);
+XBT_PUBLIC smx_timer_t SIMIX_timer_set(double date, simgrid::xbt::Task<void()> callback);
 
 template<class F> inline
 smx_timer_t SIMIX_timer_set(double date, F callback)
index 8cd2eee..ccfc8a1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team.
+/* Copyright (c) 2016-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 #include <simgrid/simix.h>
 #include <simgrid/simix.hpp>
 
-XBT_PUBLIC(void) simcall_run_blocking(std::function<void()> const& code);
+XBT_PUBLIC void simcall_run_blocking(std::function<void()> const& code);
 
 namespace simgrid {
 namespace simix {
 
-XBT_PUBLIC(void) unblock(smx_actor_t process);
+XBT_PUBLIC void unblock(smx_actor_t process);
 
 /** Execute some code in kernel mode and wakes up the actor when
  *  the result is available.
index f2517b4..e82560f 100644 (file)
@@ -1,6 +1,6 @@
 /* simgrid_config.h - Results of the configure made visible to user code.   */
 
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2018. 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. */
 SG_BEGIN_DECL()
 /** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib), while
     SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
-XBT_PUBLIC(void) sg_version_get(int *major,int *minor,int *patch);
+XBT_PUBLIC void sg_version_get(int* major, int* minor, int* patch);
 
 /** Display the version information and some additional blurb. */
-XBT_PUBLIC(void) sg_version();
+XBT_PUBLIC void sg_version();
 SG_END_DECL()
 
 
index 490a9e7..ba669e7 100644 (file)
@@ -226,63 +226,63 @@ typedef SMPI_Info* MPI_Info;
 #define MPI_STATUSES_IGNORE ((MPI_Status*)NULL)
 
 #define MPI_DATATYPE_NULL ((const MPI_Datatype)NULL)
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_CHAR;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_SHORT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_LONG;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_LONG_LONG;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_CHAR;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_SHORT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_LONG;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_LONG_LONG;
 #define MPI_LONG_LONG_INT MPI_LONG_LONG
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_SIGNED_CHAR;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UNSIGNED_CHAR;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UNSIGNED_SHORT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UNSIGNED;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UNSIGNED_LONG;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UNSIGNED_LONG_LONG;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_FLOAT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_DOUBLE;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_LONG_DOUBLE;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_WCHAR;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_C_BOOL;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INT8_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INT16_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INT32_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INT64_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UINT8_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_BYTE;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UINT16_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UINT32_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UINT64_T;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_C_FLOAT_COMPLEX;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_SIGNED_CHAR;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UNSIGNED_CHAR;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UNSIGNED_SHORT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UNSIGNED;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UNSIGNED_LONG;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UNSIGNED_LONG_LONG;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_FLOAT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_DOUBLE;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_LONG_DOUBLE;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_WCHAR;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_C_BOOL;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INT8_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INT16_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INT32_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INT64_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UINT8_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_BYTE;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UINT16_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UINT32_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UINT64_T;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_C_FLOAT_COMPLEX;
 #define MPI_C_COMPLEX MPI_C_FLOAT_COMPLEX
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_C_DOUBLE_COMPLEX;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_C_LONG_DOUBLE_COMPLEX;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_AINT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_OFFSET;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_LB;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_UB;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_C_DOUBLE_COMPLEX;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_C_LONG_DOUBLE_COMPLEX;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_AINT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_OFFSET;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_LB;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_UB;
 //The following are datatypes for the MPI functions MPI_MAXLOC  and MPI_MINLOC.
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_FLOAT_INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_LONG_INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_DOUBLE_INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_SHORT_INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_2INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_LONG_DOUBLE_INT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_2FLOAT;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_2DOUBLE;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_2LONG;//only for compatibility with Fortran
-
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_REAL;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_REAL4;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_REAL8;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_REAL16;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_COMPLEX8;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_COMPLEX16;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_COMPLEX32;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INTEGER1;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INTEGER2;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INTEGER4;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INTEGER8;
-XBT_PUBLIC_DATA( const MPI_Datatype ) MPI_INTEGER16;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_FLOAT_INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_LONG_INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_DOUBLE_INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_SHORT_INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_2INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_LONG_DOUBLE_INT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_2FLOAT;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_2DOUBLE;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_2LONG; // only for compatibility with Fortran
+
+XBT_PUBLIC_DATA const MPI_Datatype MPI_REAL;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_REAL4;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_REAL8;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_REAL16;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_COMPLEX8;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_COMPLEX16;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_COMPLEX32;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INTEGER1;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INTEGER2;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INTEGER4;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INTEGER8;
+XBT_PUBLIC_DATA const MPI_Datatype MPI_INTEGER16;
 
 //for now we only send int values at max
 #define MPI_Count int
@@ -316,32 +316,32 @@ typedef void MPI_User_function(void *invec, void *inoutvec, int *len, MPI_Dataty
 typedef SMPI_Op *MPI_Op;
 
 #define MPI_OP_NULL ((MPI_Op)NULL)
-XBT_PUBLIC_DATA( MPI_Op ) MPI_MAX;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_MIN;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_MAXLOC;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_MINLOC;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_SUM;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_PROD;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_LAND;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_LOR;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_LXOR;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_BAND;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_BOR;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_BXOR;
+XBT_PUBLIC_DATA MPI_Op MPI_MAX;
+XBT_PUBLIC_DATA MPI_Op MPI_MIN;
+XBT_PUBLIC_DATA MPI_Op MPI_MAXLOC;
+XBT_PUBLIC_DATA MPI_Op MPI_MINLOC;
+XBT_PUBLIC_DATA MPI_Op MPI_SUM;
+XBT_PUBLIC_DATA MPI_Op MPI_PROD;
+XBT_PUBLIC_DATA MPI_Op MPI_LAND;
+XBT_PUBLIC_DATA MPI_Op MPI_LOR;
+XBT_PUBLIC_DATA MPI_Op MPI_LXOR;
+XBT_PUBLIC_DATA MPI_Op MPI_BAND;
+XBT_PUBLIC_DATA MPI_Op MPI_BOR;
+XBT_PUBLIC_DATA MPI_Op MPI_BXOR;
 //For accumulate
-XBT_PUBLIC_DATA( MPI_Op ) MPI_REPLACE;
-XBT_PUBLIC_DATA( MPI_Op ) MPI_NO_OP;
+XBT_PUBLIC_DATA MPI_Op MPI_REPLACE;
+XBT_PUBLIC_DATA MPI_Op MPI_NO_OP;
 
 typedef SMPI_Group* MPI_Group;
 
 #define MPI_GROUP_NULL ((MPI_Group)NULL)
 
-XBT_PUBLIC_DATA( MPI_Group ) MPI_GROUP_EMPTY;
+XBT_PUBLIC_DATA MPI_Group MPI_GROUP_EMPTY;
 
 typedef SMPI_Comm* MPI_Comm;
 
 #define MPI_COMM_NULL ((MPI_Comm)NULL)
-XBT_PUBLIC_DATA( MPI_Comm ) MPI_COMM_WORLD;
+XBT_PUBLIC_DATA MPI_Comm MPI_COMM_WORLD;
 #define MPI_COMM_SELF smpi_process_comm_self()
 
 typedef SMPI_Request* MPI_Request;
@@ -378,283 +378,291 @@ typedef int MPI_Win_delete_attr_function(MPI_Win win, int keyval, void* attribut
 typedef int (MPI_Datarep_extent_function)(MPI_Datatype, MPI_Aint *, void *);
 typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, void *, MPI_Offset, void *);
 
-MPI_CALL(XBT_PUBLIC(int), MPI_Init, (int *argc, char ***argv));
-MPI_CALL(XBT_PUBLIC(int), MPI_Finalize, (void));
-MPI_CALL(XBT_PUBLIC(int), MPI_Finalized, (int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Init_thread, (int *argc, char ***argv, int required, int *provided));
-MPI_CALL(XBT_PUBLIC(int), MPI_Initialized, (int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Query_thread, (int *provided));
-MPI_CALL(XBT_PUBLIC(int), MPI_Is_thread_main, (int *flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_version, (int *version,int *subversion));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_library_version, (char *version,int *len));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_processor_name, (char *name, int *resultlen));
-MPI_CALL(XBT_PUBLIC(int), MPI_Abort, (MPI_Comm comm, int errorcode));
-MPI_CALL(XBT_PUBLIC(int), MPI_Alloc_mem, (MPI_Aint size, MPI_Info info, void *baseptr));
-MPI_CALL(XBT_PUBLIC(int), MPI_Free_mem, (void *base));
-MPI_CALL(XBT_PUBLIC(double), MPI_Wtime, (void));
-MPI_CALL(XBT_PUBLIC(double), MPI_Wtick,(void));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Address, (void *location, MPI_Aint * address));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_address, (void *location, MPI_Aint * address));
-MPI_CALL(XBT_PUBLIC(int), MPI_Error_class, (int errorcode, int* errorclass));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Attr_delete, (MPI_Comm comm, int keyval));
-MPI_CALL(XBT_PUBLIC(int), MPI_Attr_get, (MPI_Comm comm, int keyval, void* attr_value, int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Attr_put, (MPI_Comm comm, int keyval, void* attr_value));
-MPI_CALL(XBT_PUBLIC(int), MPI_Keyval_create, (MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, int* keyval,
-                              void* extra_state));
-MPI_CALL(XBT_PUBLIC(int), MPI_Keyval_free, (int* keyval));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_free, (MPI_Datatype * datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_size, (MPI_Datatype datatype, int *size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_size_x, (MPI_Datatype datatype, MPI_Count *size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_extent, (MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_true_extent, (MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_extent, (MPI_Datatype datatype, MPI_Aint * extent));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_lb, (MPI_Datatype datatype, MPI_Aint * disp));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_ub, (MPI_Datatype datatype, MPI_Aint * disp));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_commit, (MPI_Datatype* datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_hindexed,(int count, int* blocklens, MPI_Aint* indices,
-                            MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_hindexed, (int count, int* blocklens, MPI_Aint* indices,
-                            MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_hindexed_block, (int count, int blocklength, MPI_Aint* indices,
-                            MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_hvector, (int count, int blocklen, MPI_Aint stride,
-                             MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_hvector, (int count, int blocklen, MPI_Aint stride,
-                             MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_indexed, (int count, int* blocklens, int* indices,
-                             MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_indexed, (int count, int* blocklens, int* indices,
-                             MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_indexed_block, (int count, int blocklength, int* indices,
-                             MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_struct, (int count, int* blocklens, MPI_Aint* indices,
-                             MPI_Datatype* old_types, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_struct, (int count, int* blocklens, MPI_Aint* indices,
-                             MPI_Datatype* old_types, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_vector, (int count, int blocklen, int stride,
-                             MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_contiguous, (int count, MPI_Datatype old_type, MPI_Datatype* newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_resized ,(MPI_Datatype oldtype,MPI_Aint lb, MPI_Aint extent,
-                                                    MPI_Datatype *newtype));
-MPI_CALL(XBT_PUBLIC(MPI_Datatype), MPI_Type_f2c,(MPI_Fint datatype));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Type_c2f,(MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_count, (MPI_Status * status, MPI_Datatype datatype, int *count));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_attr, (MPI_Datatype type, int type_keyval, void *attribute_val, int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_set_attr, (MPI_Datatype type, int type_keyval, void *att));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_delete_attr, (MPI_Datatype type, int comm_keyval));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_keyval,(MPI_Type_copy_attr_function* copy_fn,
-                              MPI_Type_delete_attr_function* delete_fn, int* keyval, void* extra_state));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_free_keyval,(int* keyval));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_dup,(MPI_Datatype datatype,MPI_Datatype *newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_set_name,(MPI_Datatype  datatype, char * name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_name,(MPI_Datatype  datatype, char * name, int* len));
-
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Pack, (void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount,
-                              int* position, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Pack_size, (int incount, MPI_Datatype datatype, MPI_Comm comm, int* size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Unpack, (void* inbuf, int insize, int* position, void* outbuf, int outcount,
-                              MPI_Datatype type, MPI_Comm comm));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Op_create, (MPI_User_function * function, int commute, MPI_Op * op));
-MPI_CALL(XBT_PUBLIC(int), MPI_Op_free, (MPI_Op * op));
-MPI_CALL(XBT_PUBLIC(int), MPI_Op_commutative, (MPI_Op op, int *commute));
-MPI_CALL(XBT_PUBLIC(MPI_Op), MPI_Op_f2c,(MPI_Fint op));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Op_c2f,(MPI_Op op));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_free, (MPI_Group * group));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_size, (MPI_Group group, int *size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_rank, (MPI_Group group, int *rank));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_translate_ranks, (MPI_Group group1, int n, int *ranks1, MPI_Group group2,
-                             int *ranks2));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_compare, (MPI_Group group1, MPI_Group group2, int *result));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_union, (MPI_Group group1, MPI_Group group2, MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_intersection, (MPI_Group group1, MPI_Group group2, MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_difference, (MPI_Group group1, MPI_Group group2, MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_incl, (MPI_Group group, int n, int *ranks, MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_excl, (MPI_Group group, int n, int *ranks, MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_range_incl, (MPI_Group group, int n, int ranges[][3], MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(int), MPI_Group_range_excl, (MPI_Group group, int n, int ranges[][3], MPI_Group * newgroup));
-MPI_CALL(XBT_PUBLIC(MPI_Group), MPI_Group_f2c,(MPI_Fint group));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Group_c2f,(MPI_Group group));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_rank, (MPI_Comm comm, int *rank));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_size, (MPI_Comm comm, int *size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_name, (MPI_Comm comm, char* name, int* len));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_set_name, (MPI_Comm comm, char* name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_dup, (MPI_Comm comm, MPI_Comm * newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_attr, (MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_set_attr, (MPI_Comm comm, int comm_keyval, void *attribute_val));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_delete_attr, (MPI_Comm comm, int comm_keyval));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create_keyval,(MPI_Comm_copy_attr_function* copy_fn,
-                              MPI_Comm_delete_attr_function* delete_fn, int* keyval, void* extra_state));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_free_keyval,(int* keyval));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_group, (MPI_Comm comm, MPI_Group * group));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_compare, (MPI_Comm comm1, MPI_Comm comm2, int *result));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create, (MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create_group, (MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_free, (MPI_Comm * comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_disconnect, (MPI_Comm * comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_split, (MPI_Comm comm, int color, int key, MPI_Comm* comm_out));
-MPI_CALL(XBT_PUBLIC(MPI_Comm), MPI_Comm_f2c,(MPI_Fint comm));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Comm_c2f,(MPI_Comm comm));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Send_init, (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm,
-                             MPI_Request * request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Recv_init, (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm,
-                             MPI_Request * request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Start, (MPI_Request * request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Startall, (int count, MPI_Request * requests));
-MPI_CALL(XBT_PUBLIC(int), MPI_Request_free, (MPI_Request * request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Irecv, (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm,
-                             MPI_Request * request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Isend, (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm,
-                             MPI_Request * request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Recv, (void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm,
-                             MPI_Status * status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Send, (void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Ssend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Ssend_init, (void* buf, int count, MPI_Datatype datatype, int dest, int tag,
-                              MPI_Comm comm, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Issend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm,
-                              MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Sendrecv, (void *sendbuf, int sendcount, MPI_Datatype sendtype, int dst, int sendtag,
-                             void *recvbuf, int recvcount, MPI_Datatype recvtype, int src, int recvtag,
-                             MPI_Comm comm, MPI_Status * status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Sendrecv_replace, (void *buf, int count, MPI_Datatype datatype, int dst,
-                             int sendtag, int src, int recvtag, MPI_Comm comm, MPI_Status * status));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Test, (MPI_Request * request, int *flag, MPI_Status* status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Testany, (int count, MPI_Request requests[], int *index, int *flag, MPI_Status * status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Testall, (int count, MPI_Request* requests, int* flag, MPI_Status* statuses));
-MPI_CALL(XBT_PUBLIC(int), MPI_Testsome, (int incount, MPI_Request requests[], int *outcount, int *indices,
-                             MPI_Status status[]));
-MPI_CALL(XBT_PUBLIC(int), MPI_Wait, (MPI_Request * request, MPI_Status * status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Waitany, (int count, MPI_Request requests[], int *index, MPI_Status * status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Waitall, (int count, MPI_Request requests[], MPI_Status status[]));
-MPI_CALL(XBT_PUBLIC(int), MPI_Waitsome, (int incount, MPI_Request requests[], int *outcount, int *indices,
-                             MPI_Status status[]));
-MPI_CALL(XBT_PUBLIC(int), MPI_Iprobe, (int source, int tag, MPI_Comm comm, int* flag, MPI_Status* status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Probe, (int source, int tag, MPI_Comm comm, MPI_Status* status));
-MPI_CALL(XBT_PUBLIC(MPI_Request), MPI_Request_f2c,(MPI_Fint request));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Request_c2f,(MPI_Request request));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Bcast, (void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Barrier, (MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Gather, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                             int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Gatherv, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                             int *recvcounts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Allgather, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                             int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Allgatherv, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                             int *recvcounts, int *displs, MPI_Datatype recvtype, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Scatter, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                             int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Scatterv, (void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype,
-                             void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Reduce, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
-                             int root, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Allreduce, (void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
-                             MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Scan, (void *sendbuf, void *recvbuf, int count,MPI_Datatype datatype, MPI_Op op,
-                             MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Exscan,(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
-                                      MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Reduce_scatter, (void *sendbuf, void *recvbuf, int *recvcounts, MPI_Datatype datatype,
-                             MPI_Op op, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Reduce_scatter_block, (void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype,
-                             MPI_Op op, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Alltoall, (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
-                             int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Alltoallv, (void *sendbuf, int *sendcounts, int *senddisps, MPI_Datatype sendtype,
-                             void *recvbuf, int *recvcounts, int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Reduce_local,(void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_create,( MPI_Info *info));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_set,( MPI_Info info, char *key, char *value));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_get,(MPI_Info info,char *key,int valuelen, char *value, int *flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_free,( MPI_Info *info));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_delete,( MPI_Info info,  char *key));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_dup,(MPI_Info info, MPI_Info *newinfo));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_get_nkeys,( MPI_Info info, int *nkeys));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_get_nthkey,( MPI_Info info, int n, char *key));
-MPI_CALL(XBT_PUBLIC(int), MPI_Info_get_valuelen,( MPI_Info info, char *key, int *valuelen, int *flag));
-MPI_CALL(XBT_PUBLIC(MPI_Info), MPI_Info_f2c,(MPI_Fint info));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Info_c2f,(MPI_Info info));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_free,( MPI_Win* win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_create,( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm,
-                              MPI_Win *win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_allocate,( MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *base,
-                              MPI_Win *win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_create_dynamic,( MPI_Info info, MPI_Comm comm,
-                              MPI_Win *win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_attach,(MPI_Win win, void *base, MPI_Aint size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_detach,(MPI_Win win, void *base));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_set_name,(MPI_Win  win, char * name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_get_name,(MPI_Win  win, char * name, int* len));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_set_info,(MPI_Win  win, MPI_Info info));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_get_info,(MPI_Win  win, MPI_Info* info));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_get_group,(MPI_Win  win, MPI_Group * group));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_fence,( int assert,  MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_get_attr, (MPI_Win type, int type_keyval, void *attribute_val, int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_set_attr, (MPI_Win type, int type_keyval, void *att));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_delete_attr, (MPI_Win type, int comm_keyval));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_create_keyval,(MPI_Win_copy_attr_function* copy_fn,
-                              MPI_Win_delete_attr_function* delete_fn, int* keyval, void* extra_state));
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_free_keyval,(int* keyval));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_complete,(MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_post,(MPI_Group group, int assert, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_start,(MPI_Group group, int assert, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_wait,(MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_lock,(int lock_type, int rank, int assert, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_lock_all,(int assert, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_unlock,(int rank, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_unlock_all,(MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_flush,(int rank, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_flush_local,(int rank, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_flush_all,(MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_flush_local_all,(MPI_Win win));
-MPI_CALL(XBT_PUBLIC(MPI_Win), MPI_Win_f2c,(MPI_Fint win));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Win_c2f,(MPI_Win win));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Get,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
-    MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Put,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
-    MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
-    int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
-    void* result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
-    int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Rget,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
-    MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Rput,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
-    MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Raccumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
-    int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Rget_accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
-    void* result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
-    int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Fetch_and_op,( void *origin_addr, void* result_addr, MPI_Datatype datatype,
-    int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Compare_and_swap, (void *origin_addr, void *compare_addr,
-        void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_coords, (MPI_Comm comm, int rank, int maxdims, int* coords));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_create, (MPI_Comm comm_old, int ndims, int* dims, int* periods, int reorder,
-                                            MPI_Comm* comm_cart));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_get, (MPI_Comm comm, int maxdims, int* dims, int* periods, int* coords));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_rank, (MPI_Comm comm, int* coords, int* rank));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_shift, (MPI_Comm comm, int direction, int displ, int* source, int* dest));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_sub, (MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cartdim_get, (MPI_Comm comm, int* ndims));
-MPI_CALL(XBT_PUBLIC(int), MPI_Dims_create, (int nnodes, int ndims, int* dims));
-
+MPI_CALL(XBT_PUBLIC int, MPI_Init, (int* argc, char*** argv));
+MPI_CALL(XBT_PUBLIC int, MPI_Finalize, (void));
+MPI_CALL(XBT_PUBLIC int, MPI_Finalized, (int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Init_thread, (int* argc, char*** argv, int required, int* provided));
+MPI_CALL(XBT_PUBLIC int, MPI_Initialized, (int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Query_thread, (int* provided));
+MPI_CALL(XBT_PUBLIC int, MPI_Is_thread_main, (int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_version, (int* version, int* subversion));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_library_version, (char* version, int* len));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_processor_name, (char* name, int* resultlen));
+MPI_CALL(XBT_PUBLIC int, MPI_Abort, (MPI_Comm comm, int errorcode));
+MPI_CALL(XBT_PUBLIC int, MPI_Alloc_mem, (MPI_Aint size, MPI_Info info, void* baseptr));
+MPI_CALL(XBT_PUBLIC int, MPI_Free_mem, (void* base));
+MPI_CALL(XBT_PUBLIC double, MPI_Wtime, (void));
+MPI_CALL(XBT_PUBLIC double, MPI_Wtick, (void));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Address, (void* location, MPI_Aint* address));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_address, (void* location, MPI_Aint* address));
+MPI_CALL(XBT_PUBLIC int, MPI_Error_class, (int errorcode, int* errorclass));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Attr_delete, (MPI_Comm comm, int keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Attr_get, (MPI_Comm comm, int keyval, void* attr_value, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Attr_put, (MPI_Comm comm, int keyval, void* attr_value));
+MPI_CALL(XBT_PUBLIC int, MPI_Keyval_create,
+         (MPI_Copy_function * copy_fn, MPI_Delete_function* delete_fn, int* keyval, void* extra_state));
+MPI_CALL(XBT_PUBLIC int, MPI_Keyval_free, (int* keyval));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Type_free, (MPI_Datatype * datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_size, (MPI_Datatype datatype, int* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_size_x, (MPI_Datatype datatype, MPI_Count* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_extent, (MPI_Datatype datatype, MPI_Aint* lb, MPI_Aint* extent));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_true_extent, (MPI_Datatype datatype, MPI_Aint* lb, MPI_Aint* extent));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_extent, (MPI_Datatype datatype, MPI_Aint* extent));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_lb, (MPI_Datatype datatype, MPI_Aint* disp));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_ub, (MPI_Datatype datatype, MPI_Aint* disp));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_commit, (MPI_Datatype * datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_hindexed,
+         (int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_hindexed,
+         (int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_hindexed_block,
+         (int count, int blocklength, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_hvector,
+         (int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_hvector,
+         (int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_indexed,
+         (int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_indexed,
+         (int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_indexed_block,
+         (int count, int blocklength, int* indices, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_struct,
+         (int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_struct,
+         (int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_vector,
+         (int count, int blocklen, int stride, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_contiguous, (int count, MPI_Datatype old_type, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_resized,
+         (MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC MPI_Datatype, MPI_Type_f2c, (MPI_Fint datatype));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Type_c2f, (MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_count, (MPI_Status * status, MPI_Datatype datatype, int* count));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_attr, (MPI_Datatype type, int type_keyval, void* attribute_val, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_set_attr, (MPI_Datatype type, int type_keyval, void* att));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_delete_attr, (MPI_Datatype type, int comm_keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_keyval,
+         (MPI_Type_copy_attr_function * copy_fn, MPI_Type_delete_attr_function* delete_fn, int* keyval,
+          void* extra_state));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_free_keyval, (int* keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_dup, (MPI_Datatype datatype, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_set_name, (MPI_Datatype datatype, char* name));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_name, (MPI_Datatype datatype, char* name, int* len));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Pack,
+         (void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Pack_size, (int incount, MPI_Datatype datatype, MPI_Comm comm, int* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Unpack,
+         (void* inbuf, int insize, int* position, void* outbuf, int outcount, MPI_Datatype type, MPI_Comm comm));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Op_create, (MPI_User_function * function, int commute, MPI_Op* op));
+MPI_CALL(XBT_PUBLIC int, MPI_Op_free, (MPI_Op * op));
+MPI_CALL(XBT_PUBLIC int, MPI_Op_commutative, (MPI_Op op, int* commute));
+MPI_CALL(XBT_PUBLIC MPI_Op, MPI_Op_f2c, (MPI_Fint op));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Op_c2f, (MPI_Op op));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Group_free, (MPI_Group * group));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_size, (MPI_Group group, int* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_rank, (MPI_Group group, int* rank));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_translate_ranks,
+         (MPI_Group group1, int n, int* ranks1, MPI_Group group2, int* ranks2));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_compare, (MPI_Group group1, MPI_Group group2, int* result));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_union, (MPI_Group group1, MPI_Group group2, MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_intersection, (MPI_Group group1, MPI_Group group2, MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_difference, (MPI_Group group1, MPI_Group group2, MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_incl, (MPI_Group group, int n, int* ranks, MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_excl, (MPI_Group group, int n, int* ranks, MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_range_incl, (MPI_Group group, int n, int ranges[][3], MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC int, MPI_Group_range_excl, (MPI_Group group, int n, int ranges[][3], MPI_Group* newgroup));
+MPI_CALL(XBT_PUBLIC MPI_Group, MPI_Group_f2c, (MPI_Fint group));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Group_c2f, (MPI_Group group));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_rank, (MPI_Comm comm, int* rank));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_size, (MPI_Comm comm, int* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_get_name, (MPI_Comm comm, char* name, int* len));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_set_name, (MPI_Comm comm, char* name));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_dup, (MPI_Comm comm, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_get_attr, (MPI_Comm comm, int comm_keyval, void* attribute_val, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_set_attr, (MPI_Comm comm, int comm_keyval, void* attribute_val));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_delete_attr, (MPI_Comm comm, int comm_keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_create_keyval,
+         (MPI_Comm_copy_attr_function * copy_fn, MPI_Comm_delete_attr_function* delete_fn, int* keyval,
+          void* extra_state));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_free_keyval, (int* keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_group, (MPI_Comm comm, MPI_Group* group));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_compare, (MPI_Comm comm1, MPI_Comm comm2, int* result));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_create, (MPI_Comm comm, MPI_Group group, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_create_group, (MPI_Comm comm, MPI_Group group, int tag, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_free, (MPI_Comm * comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_disconnect, (MPI_Comm * comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_split, (MPI_Comm comm, int color, int key, MPI_Comm* comm_out));
+MPI_CALL(XBT_PUBLIC MPI_Comm, MPI_Comm_f2c, (MPI_Fint comm));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Comm_c2f, (MPI_Comm comm));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Send_init,
+         (void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Recv_init,
+         (void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Start, (MPI_Request * request));
+MPI_CALL(XBT_PUBLIC int, MPI_Startall, (int count, MPI_Request* requests));
+MPI_CALL(XBT_PUBLIC int, MPI_Request_free, (MPI_Request * request));
+MPI_CALL(XBT_PUBLIC int, MPI_Irecv,
+         (void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Isend,
+         (void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Recv,
+         (void* buf, int count, MPI_Datatype datatype, int src, int tag, MPI_Comm comm, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Send, (void* buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Ssend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Ssend_init,
+         (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Issend,
+         (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Sendrecv,
+         (void* sendbuf, int sendcount, MPI_Datatype sendtype, int dst, int sendtag, void* recvbuf, int recvcount,
+          MPI_Datatype recvtype, int src, int recvtag, MPI_Comm comm, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Sendrecv_replace, (void* buf, int count, MPI_Datatype datatype, int dst, int sendtag,
+                                                int src, int recvtag, MPI_Comm comm, MPI_Status* status));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Test, (MPI_Request * request, int* flag, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Testany, (int count, MPI_Request requests[], int* index, int* flag, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Testall, (int count, MPI_Request* requests, int* flag, MPI_Status* statuses));
+MPI_CALL(XBT_PUBLIC int, MPI_Testsome,
+         (int incount, MPI_Request requests[], int* outcount, int* indices, MPI_Status status[]));
+MPI_CALL(XBT_PUBLIC int, MPI_Wait, (MPI_Request * request, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Waitany, (int count, MPI_Request requests[], int* index, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Waitall, (int count, MPI_Request requests[], MPI_Status status[]));
+MPI_CALL(XBT_PUBLIC int, MPI_Waitsome,
+         (int incount, MPI_Request requests[], int* outcount, int* indices, MPI_Status status[]));
+MPI_CALL(XBT_PUBLIC int, MPI_Iprobe, (int source, int tag, MPI_Comm comm, int* flag, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Probe, (int source, int tag, MPI_Comm comm, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC MPI_Request, MPI_Request_f2c, (MPI_Fint request));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Request_c2f, (MPI_Request request));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Bcast, (void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Barrier, (MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Gather, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+                                      MPI_Datatype recvtype, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Gatherv, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                       int* recvcounts, int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Allgather, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                         int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Allgatherv, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                          int* recvcounts, int* displs, MPI_Datatype recvtype, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Scatter, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                       int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Scatterv, (void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype,
+                                        void* recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Reduce,
+         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Allreduce,
+         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Scan,
+         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Exscan,
+         (void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Reduce_scatter,
+         (void* sendbuf, void* recvbuf, int* recvcounts, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Reduce_scatter_block,
+         (void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Alltoall, (void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
+                                        int recvcount, MPI_Datatype recvtype, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Alltoallv,
+         (void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype sendtype, void* recvbuf, int* recvcounts,
+          int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Reduce_local, (void* inbuf, void* inoutbuf, int count, MPI_Datatype datatype, MPI_Op op));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Info_create, (MPI_Info * info));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_set, (MPI_Info info, char* key, char* value));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_get, (MPI_Info info, char* key, int valuelen, char* value, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_free, (MPI_Info * info));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_delete, (MPI_Info info, char* key));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_dup, (MPI_Info info, MPI_Info* newinfo));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_get_nkeys, (MPI_Info info, int* nkeys));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_get_nthkey, (MPI_Info info, int n, char* key));
+MPI_CALL(XBT_PUBLIC int, MPI_Info_get_valuelen, (MPI_Info info, char* key, int* valuelen, int* flag));
+MPI_CALL(XBT_PUBLIC MPI_Info, MPI_Info_f2c, (MPI_Fint info));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Info_c2f, (MPI_Info info));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Win_free, (MPI_Win * win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_create,
+         (void* base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win* win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_allocate,
+         (MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void* base, MPI_Win* win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_create_dynamic, (MPI_Info info, MPI_Comm comm, MPI_Win* win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_attach, (MPI_Win win, void* base, MPI_Aint size));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_detach, (MPI_Win win, void* base));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_set_name, (MPI_Win win, char* name));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_get_name, (MPI_Win win, char* name, int* len));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_set_info, (MPI_Win win, MPI_Info info));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_get_info, (MPI_Win win, MPI_Info* info));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_get_group, (MPI_Win win, MPI_Group* group));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_fence, (int assert, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_get_attr, (MPI_Win type, int type_keyval, void* attribute_val, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_set_attr, (MPI_Win type, int type_keyval, void* att));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_delete_attr, (MPI_Win type, int comm_keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_create_keyval,
+         (MPI_Win_copy_attr_function * copy_fn, MPI_Win_delete_attr_function* delete_fn, int* keyval,
+          void* extra_state));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_free_keyval, (int* keyval));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_complete, (MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_post, (MPI_Group group, int assert, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_start, (MPI_Group group, int assert, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_wait, (MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_lock, (int lock_type, int rank, int assert, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_lock_all, (int assert, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_unlock, (int rank, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_unlock_all, (MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_flush, (int rank, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_flush_local, (int rank, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_flush_all, (MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_flush_local_all, (MPI_Win win));
+MPI_CALL(XBT_PUBLIC MPI_Win, MPI_Win_f2c, (MPI_Fint win));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Win_c2f, (MPI_Win win));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Get, (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
+                                   MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Put, (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
+                                   MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Accumulate,
+         (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
+          int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_accumulate,
+         (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, void* result_addr, int result_count,
+          MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count,
+          MPI_Datatype target_datatype, MPI_Op op, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Rget,
+         (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
+          int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Rput,
+         (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
+          int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Raccumulate,
+         (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp,
+          int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Rget_accumulate,
+         (void* origin_addr, int origin_count, MPI_Datatype origin_datatype, void* result_addr, int result_count,
+          MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count,
+          MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Fetch_and_op, (void* origin_addr, void* result_addr, MPI_Datatype datatype,
+                                            int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win));
+MPI_CALL(XBT_PUBLIC int, MPI_Compare_and_swap,
+         (void* origin_addr, void* compare_addr, void* result_addr, MPI_Datatype datatype, int target_rank,
+          MPI_Aint target_disp, MPI_Win win));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_coords, (MPI_Comm comm, int rank, int maxdims, int* coords));
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_create,
+         (MPI_Comm comm_old, int ndims, int* dims, int* periods, int reorder, MPI_Comm* comm_cart));
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_get, (MPI_Comm comm, int maxdims, int* dims, int* periods, int* coords));
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_rank, (MPI_Comm comm, int* coords, int* rank));
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_shift, (MPI_Comm comm, int direction, int displ, int* source, int* dest));
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_sub, (MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new));
+MPI_CALL(XBT_PUBLIC int, MPI_Cartdim_get, (MPI_Comm comm, int* ndims));
+MPI_CALL(XBT_PUBLIC int, MPI_Dims_create, (int nnodes, int ndims, int* dims));
 
 //FIXME: these are not yet implemented
 
@@ -699,220 +707,247 @@ typedef MPI_Comm_errhandler_function MPI_Comm_errhandler_fn;
 typedef MPI_File_errhandler_function MPI_File_errhandler_fn;
 typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn;
 #define MPI_INFO_ENV 1
-XBT_PUBLIC_DATA( const MPI_Datatype )  MPI_PACKED;
-XBT_PUBLIC_DATA(MPI_Errhandler*)  MPI_ERRORS_RETURN;
-XBT_PUBLIC_DATA(MPI_Errhandler*)  MPI_ERRORS_ARE_FATAL;
-XBT_PUBLIC_DATA(MPI_Errhandler*)  MPI_ERRHANDLER_NULL;
-
-MPI_CALL(XBT_PUBLIC(MPI_Errhandler), MPI_Errhandler_f2c,(MPI_Fint errhandler));
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_Errhandler_c2f,(MPI_Errhandler errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cart_map, (MPI_Comm comm_old, int ndims, int* dims, int* periods, int* newrank));
-MPI_CALL(XBT_PUBLIC(int), MPI_Graph_create, (MPI_Comm comm_old, int nnodes, int* index, int* edges, int reorder,
-                                             MPI_Comm* comm_graph));
-MPI_CALL(XBT_PUBLIC(int), MPI_Graph_get, (MPI_Comm comm, int maxindex, int maxedges, int* index, int* edges));
-MPI_CALL(XBT_PUBLIC(int), MPI_Graph_map, (MPI_Comm comm_old, int nnodes, int* index, int* edges, int* newrank));
-MPI_CALL(XBT_PUBLIC(int), MPI_Graph_neighbors, (MPI_Comm comm, int rank, int maxneighbors, int* neighbors));
-MPI_CALL(XBT_PUBLIC(int), MPI_Graph_neighbors_count, (MPI_Comm comm, int rank, int* nneighbors));
-MPI_CALL(XBT_PUBLIC(int), MPI_Graphdims_get, (MPI_Comm comm, int* nnodes, int* nedges));
-MPI_CALL(XBT_PUBLIC(int), MPI_Topo_test, (MPI_Comm comm, int* top_type));
-MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_create, (MPI_Handler_function* function, MPI_Errhandler* errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_free, (MPI_Errhandler* errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_get, (MPI_Comm comm, MPI_Errhandler* errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Error_string, (int errorcode, char* string, int* resultlen));
-MPI_CALL(XBT_PUBLIC(int), MPI_Errhandler_set, (MPI_Comm comm, MPI_Errhandler errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_set_errhandler, (MPI_Comm comm, MPI_Errhandler errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_errhandler, (MPI_Comm comm, MPI_Errhandler *errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_create_errhandler,( MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_call_errhandler,(MPI_Comm comm,int errorcode));
-MPI_CALL(XBT_PUBLIC(int), MPI_Add_error_class,( int *errorclass));
-MPI_CALL(XBT_PUBLIC(int), MPI_Add_error_code,(  int errorclass, int *errorcode));
-MPI_CALL(XBT_PUBLIC(int), MPI_Add_error_string,( int errorcode, char *string));
-MPI_CALL(XBT_PUBLIC(int), MPI_Cancel, (MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Buffer_attach, (void* buffer, int size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Buffer_detach, (void* buffer, int* size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_test_inter, (MPI_Comm comm, int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Intercomm_create, (MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm,
-                              int remote_leader, int tag, MPI_Comm* comm_out));
-MPI_CALL(XBT_PUBLIC(int), MPI_Intercomm_merge, (MPI_Comm comm, int high, MPI_Comm* comm_out));
-MPI_CALL(XBT_PUBLIC(int), MPI_Bsend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Bsend_init, (void* buf, int count, MPI_Datatype datatype, int dest, int tag,
-                              MPI_Comm comm, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Ibsend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm,
-                              MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_remote_group, (MPI_Comm comm, MPI_Group* group));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_remote_size, (MPI_Comm comm, int* size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Rsend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Rsend_init, (void* buf, int count, MPI_Datatype datatype, int dest, int tag,
-                              MPI_Comm comm, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Irsend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm,
-                              MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Test_cancelled, (MPI_Status* status, int* flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_elements, (MPI_Status* status, MPI_Datatype datatype, int* elements));
-MPI_CALL(XBT_PUBLIC(int), MPI_Pcontrol, (const int level, ... ));
-
-MPI_CALL(XBT_PUBLIC(int), MPI_Win_set_errhandler, (MPI_Win win, MPI_Errhandler errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_envelope,(MPI_Datatype datatype,int *num_integers,int *num_addresses,
-                            int *num_datatypes, int *combiner));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_contents,(MPI_Datatype datatype, int max_integers, int max_addresses,
-                            int max_datatypes, int* array_of_integers, MPI_Aint* array_of_addresses,
-                            MPI_Datatype *array_of_datatypes));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_darray,(int size, int rank, int ndims, int* array_of_gsizes,
-                            int* array_of_distribs, int* array_of_dargs, int* array_of_psizes,
-                            int order, MPI_Datatype oldtype, MPI_Datatype *newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Pack_external_size, (char *datarep, int incount, MPI_Datatype datatype, MPI_Aint *size));
-MPI_CALL(XBT_PUBLIC(int), MPI_Pack_external, (char *datarep, void *inbuf, int incount, MPI_Datatype datatype,
-                                              void *outbuf, MPI_Aint outcount, MPI_Aint *position));
-MPI_CALL(XBT_PUBLIC(int), MPI_Unpack_external, (char *datarep, void *inbuf, MPI_Aint insize, MPI_Aint *position,
-                                                void *outbuf, int outcount, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_subarray,(int ndims,int *array_of_sizes, int *array_of_subsizes,
-                              int *array_of_starts, int order, MPI_Datatype oldtype, MPI_Datatype *newtype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Type_match_size,(int typeclass,int size,MPI_Datatype *datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_Alltoallw, ( void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype *sendtypes,
-                              void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype *recvtypes, MPI_Comm comm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_set_info, (MPI_Comm comm, MPI_Info info));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_info, (MPI_Comm comm, MPI_Info* info));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_dup_with_info,(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_split_type,(MPI_Comm comm, int split_type, int key, MPI_Info info,
-                                               MPI_Comm *newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_connect,(char *port_name, MPI_Info info, int root, MPI_Comm comm,
-                                            MPI_Comm *newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Request_get_status,( MPI_Request request, int *flag, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_Grequest_start,(MPI_Grequest_query_function *query_fn,
-                                              MPI_Grequest_free_function *free_fn,
-                                              MPI_Grequest_cancel_function *cancel_fn,
-                                              void *extra_state, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Grequest_complete,( MPI_Request request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Status_set_cancelled,(MPI_Status *status,int flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_Status_set_elements,( MPI_Status *status, MPI_Datatype datatype, int count));
-MPI_CALL(XBT_PUBLIC(int), MPI_Unpublish_name,( char *service_name, MPI_Info info, char *port_name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Publish_name,( char *service_name, MPI_Info info, char *port_name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Lookup_name,( char *service_name, MPI_Info info, char *port_name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_join,( int fd, MPI_Comm *intercomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Open_port,( MPI_Info info, char *port_name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Close_port,( char *port_name));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_accept,(char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_spawn,(char *command, char **argv, int maxprocs, MPI_Info info, int root,
-                                          MPI_Comm comm, MPI_Comm *intercomm, int* array_of_errcodes));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_spawn_multiple,(int count, char **array_of_commands, char*** array_of_argv,
-                                                   int* array_of_maxprocs, MPI_Info* array_of_info, int root,
-                                                   MPI_Comm comm, MPI_Comm *intercomm, int* array_of_errcodes));
-MPI_CALL(XBT_PUBLIC(int), MPI_Comm_get_parent,( MPI_Comm *parent));
-MPI_CALL(XBT_PUBLIC(int),  MPI_Win_test,(MPI_Win win, int *flag));
-
-MPI_CALL(XBT_PUBLIC(MPI_Fint), MPI_File_c2f,(MPI_File file));
-MPI_CALL(XBT_PUBLIC(MPI_File), MPI_File_f2c,(MPI_Fint file));
-MPI_CALL(XBT_PUBLIC(int), MPI_Register_datarep,(char *datarep, MPI_Datarep_conversion_function *read_conversion_fn, MPI_Datarep_conversion_function *write_conversion_fn, MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_call_errhandler,(MPI_File fh, int errorcode));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_create_errhandler,(MPI_File_errhandler_function *function, MPI_Errhandler *errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_set_errhandler,( MPI_File file, MPI_Errhandler errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_errhandler,( MPI_File file, MPI_Errhandler *errhandler));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_open,(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_close,(MPI_File *fh));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_delete,(char *filename, MPI_Info info));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_set_size,(MPI_File fh, MPI_Offset size));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_preallocate,(MPI_File fh, MPI_Offset size));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_size,(MPI_File fh, MPI_Offset *size));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_group,(MPI_File fh, MPI_Group *group));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_amode,(MPI_File fh, int *amode));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_set_info,(MPI_File fh, MPI_Info info));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_info,(MPI_File fh, MPI_Info *info_used));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_set_view,(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char *datarep, MPI_Info info));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_view,(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_Datatype *filetype, char *datarep));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_at,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_at_all,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_at,(MPI_File fh, MPI_Offset offset, void *buf,int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_at_all,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iread_at,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iwrite_at,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iread_at_all,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iwrite_at_all,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_all,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_all,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iread,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iwrite,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iread_all,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iwrite_all,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_seek,(MPI_File fh, MPI_Offset offset, int whenace));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_position,(MPI_File fh, MPI_Offset *offset));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_byte_offset,(MPI_File fh, MPI_Offset offset, MPI_Offset *disp));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_shared,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_shared,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iread_shared,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_iwrite_shared,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_ordered,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_ordered,(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_seek_shared,(MPI_File fh, MPI_Offset offset, int whence));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_position_shared,(MPI_File fh, MPI_Offset *offset));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_at_all_begin,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_at_all_end,(MPI_File fh, void *buf, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_at_all_begin,(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_at_all_end,(MPI_File fh, void *buf, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_all_begin,(MPI_File fh, void *buf, int count, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_all_end,(MPI_File fh, void *buf, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_all_begin,(MPI_File fh, void *buf, int count, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_all_end,(MPI_File fh, void *buf, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_ordered_begin,(MPI_File fh, void *buf, int count, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_read_ordered_end,(MPI_File fh, void *buf, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_ordered_begin,(MPI_File fh, void *buf, int count, MPI_Datatype datatype));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_write_ordered_end,(MPI_File fh, void *buf, MPI_Status *status));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_type_extent,(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_set_atomicity,(MPI_File fh, int flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_get_atomicity,(MPI_File fh, int *flag));
-MPI_CALL(XBT_PUBLIC(int), MPI_File_sync,(MPI_File fh));
-
+XBT_PUBLIC_DATA const MPI_Datatype MPI_PACKED;
+XBT_PUBLIC_DATA MPI_Errhandler* MPI_ERRORS_RETURN;
+XBT_PUBLIC_DATA MPI_Errhandler* MPI_ERRORS_ARE_FATAL;
+XBT_PUBLIC_DATA MPI_Errhandler* MPI_ERRHANDLER_NULL;
+
+MPI_CALL(XBT_PUBLIC MPI_Errhandler, MPI_Errhandler_f2c, (MPI_Fint errhandler));
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_Errhandler_c2f, (MPI_Errhandler errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Cart_map, (MPI_Comm comm_old, int ndims, int* dims, int* periods, int* newrank));
+MPI_CALL(XBT_PUBLIC int, MPI_Graph_create,
+         (MPI_Comm comm_old, int nnodes, int* index, int* edges, int reorder, MPI_Comm* comm_graph));
+MPI_CALL(XBT_PUBLIC int, MPI_Graph_get, (MPI_Comm comm, int maxindex, int maxedges, int* index, int* edges));
+MPI_CALL(XBT_PUBLIC int, MPI_Graph_map, (MPI_Comm comm_old, int nnodes, int* index, int* edges, int* newrank));
+MPI_CALL(XBT_PUBLIC int, MPI_Graph_neighbors, (MPI_Comm comm, int rank, int maxneighbors, int* neighbors));
+MPI_CALL(XBT_PUBLIC int, MPI_Graph_neighbors_count, (MPI_Comm comm, int rank, int* nneighbors));
+MPI_CALL(XBT_PUBLIC int, MPI_Graphdims_get, (MPI_Comm comm, int* nnodes, int* nedges));
+MPI_CALL(XBT_PUBLIC int, MPI_Topo_test, (MPI_Comm comm, int* top_type));
+MPI_CALL(XBT_PUBLIC int, MPI_Errhandler_create, (MPI_Handler_function * function, MPI_Errhandler* errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Errhandler_free, (MPI_Errhandler * errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Errhandler_get, (MPI_Comm comm, MPI_Errhandler* errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Error_string, (int errorcode, char* string, int* resultlen));
+MPI_CALL(XBT_PUBLIC int, MPI_Errhandler_set, (MPI_Comm comm, MPI_Errhandler errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_set_errhandler, (MPI_Comm comm, MPI_Errhandler errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_get_errhandler, (MPI_Comm comm, MPI_Errhandler* errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_create_errhandler, (MPI_Comm_errhandler_fn * function, MPI_Errhandler* errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_call_errhandler, (MPI_Comm comm, int errorcode));
+MPI_CALL(XBT_PUBLIC int, MPI_Add_error_class, (int* errorclass));
+MPI_CALL(XBT_PUBLIC int, MPI_Add_error_code, (int errorclass, int* errorcode));
+MPI_CALL(XBT_PUBLIC int, MPI_Add_error_string, (int errorcode, char* string));
+MPI_CALL(XBT_PUBLIC int, MPI_Cancel, (MPI_Request * request));
+MPI_CALL(XBT_PUBLIC int, MPI_Buffer_attach, (void* buffer, int size));
+MPI_CALL(XBT_PUBLIC int, MPI_Buffer_detach, (void* buffer, int* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_test_inter, (MPI_Comm comm, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Intercomm_create,
+         (MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm* comm_out));
+MPI_CALL(XBT_PUBLIC int, MPI_Intercomm_merge, (MPI_Comm comm, int high, MPI_Comm* comm_out));
+MPI_CALL(XBT_PUBLIC int, MPI_Bsend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Bsend_init,
+         (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Ibsend,
+         (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_remote_group, (MPI_Comm comm, MPI_Group* group));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_remote_size, (MPI_Comm comm, int* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Rsend, (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Rsend_init,
+         (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Irsend,
+         (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Test_cancelled, (MPI_Status * status, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Get_elements, (MPI_Status * status, MPI_Datatype datatype, int* elements));
+MPI_CALL(XBT_PUBLIC int, MPI_Pcontrol, (const int level, ...));
+
+MPI_CALL(XBT_PUBLIC int, MPI_Win_set_errhandler, (MPI_Win win, MPI_Errhandler errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_envelope,
+         (MPI_Datatype datatype, int* num_integers, int* num_addresses, int* num_datatypes, int* combiner));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_contents,
+         (MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int* array_of_integers,
+          MPI_Aint* array_of_addresses, MPI_Datatype* array_of_datatypes));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_darray,
+         (int size, int rank, int ndims, int* array_of_gsizes, int* array_of_distribs, int* array_of_dargs,
+          int* array_of_psizes, int order, MPI_Datatype oldtype, MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Pack_external_size, (char* datarep, int incount, MPI_Datatype datatype, MPI_Aint* size));
+MPI_CALL(XBT_PUBLIC int, MPI_Pack_external, (char* datarep, void* inbuf, int incount, MPI_Datatype datatype,
+                                             void* outbuf, MPI_Aint outcount, MPI_Aint* position));
+MPI_CALL(XBT_PUBLIC int, MPI_Unpack_external, (char* datarep, void* inbuf, MPI_Aint insize, MPI_Aint* position,
+                                               void* outbuf, int outcount, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_create_subarray,
+         (int ndims, int* array_of_sizes, int* array_of_subsizes, int* array_of_starts, int order, MPI_Datatype oldtype,
+          MPI_Datatype* newtype));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_match_size, (int typeclass, int size, MPI_Datatype* datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_Alltoallw,
+         (void* sendbuf, int* sendcnts, int* sdispls, MPI_Datatype* sendtypes, void* recvbuf, int* recvcnts,
+          int* rdispls, MPI_Datatype* recvtypes, MPI_Comm comm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_set_info, (MPI_Comm comm, MPI_Info info));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_get_info, (MPI_Comm comm, MPI_Info* info));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_dup_with_info, (MPI_Comm comm, MPI_Info info, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_split_type,
+         (MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_connect,
+         (char* port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Request_get_status, (MPI_Request request, int* flag, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_Grequest_start,
+         (MPI_Grequest_query_function * query_fn, MPI_Grequest_free_function* free_fn,
+          MPI_Grequest_cancel_function* cancel_fn, void* extra_state, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_Grequest_complete, (MPI_Request request));
+MPI_CALL(XBT_PUBLIC int, MPI_Status_set_cancelled, (MPI_Status * status, int flag));
+MPI_CALL(XBT_PUBLIC int, MPI_Status_set_elements, (MPI_Status * status, MPI_Datatype datatype, int count));
+MPI_CALL(XBT_PUBLIC int, MPI_Unpublish_name, (char* service_name, MPI_Info info, char* port_name));
+MPI_CALL(XBT_PUBLIC int, MPI_Publish_name, (char* service_name, MPI_Info info, char* port_name));
+MPI_CALL(XBT_PUBLIC int, MPI_Lookup_name, (char* service_name, MPI_Info info, char* port_name));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_join, (int fd, MPI_Comm* intercomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Open_port, (MPI_Info info, char* port_name));
+MPI_CALL(XBT_PUBLIC int, MPI_Close_port, (char* port_name));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_accept, (char* port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm* newcomm));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_spawn, (char* command, char** argv, int maxprocs, MPI_Info info, int root,
+                                          MPI_Comm comm, MPI_Comm* intercomm, int* array_of_errcodes));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_spawn_multiple,
+         (int count, char** array_of_commands, char*** array_of_argv, int* array_of_maxprocs, MPI_Info* array_of_info,
+          int root, MPI_Comm comm, MPI_Comm* intercomm, int* array_of_errcodes));
+MPI_CALL(XBT_PUBLIC int, MPI_Comm_get_parent, (MPI_Comm * parent));
+MPI_CALL(XBT_PUBLIC int, MPI_Win_test, (MPI_Win win, int* flag));
+
+MPI_CALL(XBT_PUBLIC MPI_Fint, MPI_File_c2f, (MPI_File file));
+MPI_CALL(XBT_PUBLIC MPI_File, MPI_File_f2c, (MPI_Fint file));
+MPI_CALL(XBT_PUBLIC int, MPI_Register_datarep, (char* datarep, MPI_Datarep_conversion_function* read_conversion_fn,
+                                                MPI_Datarep_conversion_function* write_conversion_fn,
+                                                MPI_Datarep_extent_function* dtype_file_extent_fn, void* extra_state));
+MPI_CALL(XBT_PUBLIC int, MPI_File_call_errhandler, (MPI_File fh, int errorcode));
+MPI_CALL(XBT_PUBLIC int, MPI_File_create_errhandler,
+         (MPI_File_errhandler_function * function, MPI_Errhandler* errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_File_set_errhandler, (MPI_File file, MPI_Errhandler errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_errhandler, (MPI_File file, MPI_Errhandler* errhandler));
+MPI_CALL(XBT_PUBLIC int, MPI_File_open, (MPI_Comm comm, char* filename, int amode, MPI_Info info, MPI_File* fh));
+MPI_CALL(XBT_PUBLIC int, MPI_File_close, (MPI_File * fh));
+MPI_CALL(XBT_PUBLIC int, MPI_File_delete, (char* filename, MPI_Info info));
+MPI_CALL(XBT_PUBLIC int, MPI_File_set_size, (MPI_File fh, MPI_Offset size));
+MPI_CALL(XBT_PUBLIC int, MPI_File_preallocate, (MPI_File fh, MPI_Offset size));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_size, (MPI_File fh, MPI_Offset* size));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_group, (MPI_File fh, MPI_Group* group));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_amode, (MPI_File fh, int* amode));
+MPI_CALL(XBT_PUBLIC int, MPI_File_set_info, (MPI_File fh, MPI_Info info));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_info, (MPI_File fh, MPI_Info* info_used));
+MPI_CALL(XBT_PUBLIC int, MPI_File_set_view,
+         (MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, char* datarep, MPI_Info info));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_view,
+         (MPI_File fh, MPI_Offset* disp, MPI_Datatype* etype, MPI_Datatype* filetype, char* datarep));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_at,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_at_all,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_at,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_at_all,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iread_at,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iwrite_at,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iread_at_all,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iwrite_at_all,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read, (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_all,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_all,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iread,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iwrite,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iread_all,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iwrite_all,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_seek, (MPI_File fh, MPI_Offset offset, int whenace));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_position, (MPI_File fh, MPI_Offset* offset));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_byte_offset, (MPI_File fh, MPI_Offset offset, MPI_Offset* disp));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_shared,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_shared,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iread_shared,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_iwrite_shared,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Request* request));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_ordered,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_ordered,
+         (MPI_File fh, void* buf, int count, MPI_Datatype datatype, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_seek_shared, (MPI_File fh, MPI_Offset offset, int whence));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_position_shared, (MPI_File fh, MPI_Offset* offset));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_at_all_begin,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_at_all_end, (MPI_File fh, void* buf, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_at_all_begin,
+         (MPI_File fh, MPI_Offset offset, void* buf, int count, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_at_all_end, (MPI_File fh, void* buf, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_all_begin, (MPI_File fh, void* buf, int count, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_all_end, (MPI_File fh, void* buf, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_all_begin, (MPI_File fh, void* buf, int count, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_all_end, (MPI_File fh, void* buf, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_ordered_begin, (MPI_File fh, void* buf, int count, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_File_read_ordered_end, (MPI_File fh, void* buf, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_ordered_begin, (MPI_File fh, void* buf, int count, MPI_Datatype datatype));
+MPI_CALL(XBT_PUBLIC int, MPI_File_write_ordered_end, (MPI_File fh, void* buf, MPI_Status* status));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_type_extent, (MPI_File fh, MPI_Datatype datatype, MPI_Aint* extent));
+MPI_CALL(XBT_PUBLIC int, MPI_File_set_atomicity, (MPI_File fh, int flag));
+MPI_CALL(XBT_PUBLIC int, MPI_File_get_atomicity, (MPI_File fh, int* flag));
+MPI_CALL(XBT_PUBLIC int, MPI_File_sync, (MPI_File fh));
 
 //FIXME: End of all the not yet implemented stuff
 
 // smpi functions
-XBT_PUBLIC(int) smpi_global_size();
-XBT_PUBLIC(MPI_Comm) smpi_process_comm_self();
-XBT_PUBLIC(void*) smpi_process_get_user_data();
-XBT_PUBLIC(void) smpi_process_set_user_data(void *);
+XBT_PUBLIC int smpi_global_size();
+XBT_PUBLIC MPI_Comm smpi_process_comm_self();
+XBT_PUBLIC void* smpi_process_get_user_data();
+XBT_PUBLIC void smpi_process_set_user_data(void*);
 
-XBT_PUBLIC(void) smpi_execute_flops(double flops);
-XBT_PUBLIC(void) smpi_execute(double duration);
-XBT_PUBLIC(void) smpi_execute_benched(double duration);
+XBT_PUBLIC void smpi_execute_flops(double flops);
+XBT_PUBLIC void smpi_execute(double duration);
+XBT_PUBLIC void smpi_execute_benched(double duration);
 
-XBT_PUBLIC(double) smpi_get_host_power_peak_at(int pstate_index);
-XBT_PUBLIC(double) smpi_get_host_current_power_peak();
-XBT_PUBLIC(int) smpi_get_host_nb_pstates();
-XBT_PUBLIC(void) smpi_set_host_pstate(int pstate_index);
-XBT_PUBLIC(int)  smpi_get_host_pstate();
+XBT_PUBLIC double smpi_get_host_power_peak_at(int pstate_index);
+XBT_PUBLIC double smpi_get_host_current_power_peak();
+XBT_PUBLIC int smpi_get_host_nb_pstates();
+XBT_PUBLIC void smpi_set_host_pstate(int pstate_index);
+XBT_PUBLIC int smpi_get_host_pstate();
 
-XBT_PUBLIC(double) smpi_get_host_consumed_energy();
+XBT_PUBLIC double smpi_get_host_consumed_energy();
 
-XBT_PUBLIC(int) smpi_usleep(useconds_t usecs);
+XBT_PUBLIC int smpi_usleep(useconds_t usecs);
 #if _POSIX_TIMERS > 0
-XBT_PUBLIC(int) smpi_nanosleep(const struct timespec *tp, struct timespec * t);
-XBT_PUBLIC(int) smpi_clock_gettime(clockid_t clk_id, struct timespec *tp);
+XBT_PUBLIC int smpi_nanosleep(const struct timespec* tp, struct timespec* t);
+XBT_PUBLIC int smpi_clock_gettime(clockid_t clk_id, struct timespec* tp);
 #endif
-XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs);
-XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, void* tz);
-XBT_PUBLIC(unsigned long long) smpi_rastro_resolution ();
-XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp ();
-XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line, int iters, double threshold);
-XBT_PUBLIC(int) smpi_sample_2(int global, const char *file, int line);
-XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line);
+XBT_PUBLIC unsigned int smpi_sleep(unsigned int secs);
+XBT_PUBLIC int smpi_gettimeofday(struct timeval* tv, void* tz);
+XBT_PUBLIC unsigned long long smpi_rastro_resolution();
+XBT_PUBLIC unsigned long long smpi_rastro_timestamp();
+XBT_PUBLIC void smpi_sample_1(int global, const char* file, int line, int iters, double threshold);
+XBT_PUBLIC int smpi_sample_2(int global, const char* file, int line);
+XBT_PUBLIC void smpi_sample_3(int global, const char* file, int line);
 
 /**
  * Need a public setter for SMPI copy_callback function, so users can define
  * their own while still using default SIMIX_copy_callback for MSG copies.
  */
-XBT_PUBLIC(void) smpi_comm_set_copy_data_callback(void (*callback) (smx_activity_t, void*, size_t));
-
+XBT_PUBLIC void smpi_comm_set_copy_data_callback(void (*callback)(smx_activity_t, void*, size_t));
 
 /**
  * Functions for call location tracing. These functions will be
  * called from the user's application! (With the __FILE__ and __LINE__ values
  * passed as parameters.)
  */
-XBT_PUBLIC(void) smpi_trace_set_call_location(const char *file, int line);
+XBT_PUBLIC void smpi_trace_set_call_location(const char* file, int line);
 /** Fortran binding **/
-XBT_PUBLIC(void) smpi_trace_set_call_location_(const char *file, int* line);
+XBT_PUBLIC void smpi_trace_set_call_location_(const char* file, int* line);
 /** Fortran binding + -fsecond-underscore **/
-XBT_PUBLIC(void) smpi_trace_set_call_location__(const char *file, int* line);
+XBT_PUBLIC void smpi_trace_set_call_location__(const char* file, int* line);
 
 #define SMPI_SAMPLE_LOOP(global, iters, thres)                                                                         \
   for (smpi_sample_1(global, __FILE__, __LINE__, iters, thres); smpi_sample_2(global, __FILE__, __LINE__);             \
@@ -923,40 +958,41 @@ XBT_PUBLIC(void) smpi_trace_set_call_location__(const char *file, int* line);
 #define SMPI_SAMPLE_DELAY(duration) for(smpi_execute(duration); 0; )
 #define SMPI_SAMPLE_FLOPS(flops) for(smpi_execute_flops(flops); 0; )
 
-XBT_PUBLIC(void *) smpi_shared_malloc(size_t size, const char *file, int line);
+XBT_PUBLIC void* smpi_shared_malloc(size_t size, const char* file, int line);
 #define SMPI_SHARED_MALLOC(size) smpi_shared_malloc(size, __FILE__, __LINE__)
-XBT_PUBLIC(void*) smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int nb_shared_blocks);
+XBT_PUBLIC void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int nb_shared_blocks);
 #define SMPI_PARTIAL_SHARED_MALLOC(size, shared_block_offsets, nb_shared_blocks)                                       \
   smpi_shared_malloc_partial(size, shared_block_offsets, nb_shared_blocks)
 
-XBT_PUBLIC(void) smpi_shared_free(void *data);
+XBT_PUBLIC void smpi_shared_free(void* data);
 #define SMPI_SHARED_FREE(data) smpi_shared_free(data)
 
-XBT_PUBLIC(int) smpi_shared_known_call(const char* func, const char* input);
-XBT_PUBLIC(void*) smpi_shared_get_call(const char* func, const char* input);
-XBT_PUBLIC(void*) smpi_shared_set_call(const char* func, const char* input, void* data);
+XBT_PUBLIC int smpi_shared_known_call(const char* func, const char* input);
+XBT_PUBLIC void* smpi_shared_get_call(const char* func, const char* input);
+XBT_PUBLIC void* smpi_shared_set_call(const char* func, const char* input, void* data);
 #define SMPI_SHARED_CALL(func, input, ...) \
    (smpi_shared_known_call(#func, input) ? smpi_shared_get_call(#func, input) \
                                          : smpi_shared_set_call(#func, input, (func(__VA_ARGS__))))
 
 /* Fortran specific stuff */
 
-XBT_PUBLIC(int) smpi_main(const char* program, int argc, char *argv[]);
-XBT_ATTRIB_DEPRECATED_v322("Use Actor::self()->getPid(): v3.22 will turn this warning into an error.") XBT_PUBLIC(int) smpi_process_index();
-XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv);
+XBT_PUBLIC int smpi_main(const char* program, int argc, char* argv[]);
+XBT_ATTRIB_DEPRECATED_v322("Use Actor::self()->getPid(): v3.22 will turn this warning into an error.") XBT_PUBLIC
+    int smpi_process_index();
+XBT_PUBLIC void smpi_process_init(int* argc, char*** argv);
 
 /* Trace replay specific stuff */
-XBT_PUBLIC(void) smpi_replay_init(int* argc, char*** argv); // Only initialization
-XBT_PUBLIC(void) smpi_replay_main(int* argc, char*** argv); // Launch the replay once init is done
-XBT_PUBLIC(void) smpi_replay_run(int* argc, char*** argv);  // Both init and start
+XBT_PUBLIC void smpi_replay_init(int* argc, char*** argv); // Only initialization
+XBT_PUBLIC void smpi_replay_main(int* argc, char*** argv); // Launch the replay once init is done
+XBT_PUBLIC void smpi_replay_run(int* argc, char*** argv);  // Both init and start
 
-XBT_PUBLIC(void) SMPI_app_instance_register(const char *name, xbt_main_func_t code, int num_processes);
-XBT_PUBLIC(void) SMPI_init();
-XBT_PUBLIC(void) SMPI_finalize();
+XBT_PUBLIC void SMPI_app_instance_register(const char* name, xbt_main_func_t code, int num_processes);
+XBT_PUBLIC void SMPI_init();
+XBT_PUBLIC void SMPI_finalize();
 
 /* Manual global privatization fallback */
-XBT_PUBLIC(void) smpi_register_static(void* arg, void_f_pvoid_t free_fn);
-XBT_PUBLIC(void) smpi_free_static();
+XBT_PUBLIC void smpi_register_static(void* arg, void_f_pvoid_t free_fn);
+XBT_PUBLIC void smpi_free_static();
 
 #define SMPI_VARINIT_GLOBAL(name,type)                          \
 type *name = NULL;                                              \
@@ -1022,7 +1058,7 @@ SG_END_DECL()
 #ifdef __cplusplus
 #include <vector>
 
-XBT_PUBLIC(int) smpi_is_shared(void* ptr, std::vector<std::pair<size_t, size_t>>& private_blocks, size_t* offset);
+XBT_PUBLIC int smpi_is_shared(void* ptr, std::vector<std::pair<size_t, size_t>>& private_blocks, size_t* offset);
 
 std::vector<std::pair<size_t, size_t>> shift_and_frame_private_blocks(const std::vector<std::pair<size_t, size_t>> vec,
                                                                       size_t offset, size_t buff_size);
index 06ade63..ffed6ac 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014. The SimGrid Team.
+/* Copyright (c) 2012, 2014-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -23,22 +23,22 @@ struct RngStream_InfoState {
 
 SG_BEGIN_DECL();
 
-XBT_PUBLIC(int) RngStream_SetPackageSeed (unsigned long seed[6]);
-XBT_PUBLIC(RngStream) RngStream_CreateStream (const char name[]);
-XBT_PUBLIC(void) RngStream_DeleteStream (RngStream *pg);
-XBT_PUBLIC(RngStream) RngStream_CopyStream (const RngStream src);
-XBT_PUBLIC(void) RngStream_ResetStartStream (RngStream g);
-XBT_PUBLIC(void) RngStream_ResetStartSubstream (RngStream g);
-XBT_PUBLIC(void) RngStream_ResetNextSubstream (RngStream g);
-XBT_PUBLIC(void) RngStream_SetAntithetic (RngStream g, int a);
-XBT_PUBLIC(void) RngStream_IncreasedPrecis (RngStream g, int incp);
-XBT_PUBLIC(int) RngStream_SetSeed (RngStream g, unsigned long seed[6]);
-XBT_PUBLIC(void) RngStream_AdvanceState (RngStream g, long e, long c);
-XBT_PUBLIC(void) RngStream_GetState (RngStream g, unsigned long seed[6]);
-XBT_PUBLIC(void) RngStream_WriteState (RngStream g);
-XBT_PUBLIC(void) RngStream_WriteStateFull (RngStream g);
-XBT_PUBLIC(double) RngStream_RandU01 (RngStream g);
-XBT_PUBLIC(int) RngStream_RandInt (RngStream g, int i, int j);
+XBT_PUBLIC int RngStream_SetPackageSeed(unsigned long seed[6]);
+XBT_PUBLIC RngStream RngStream_CreateStream(const char name[]);
+XBT_PUBLIC void RngStream_DeleteStream(RngStream* pg);
+XBT_PUBLIC RngStream RngStream_CopyStream(const RngStream src);
+XBT_PUBLIC void RngStream_ResetStartStream(RngStream g);
+XBT_PUBLIC void RngStream_ResetStartSubstream(RngStream g);
+XBT_PUBLIC void RngStream_ResetNextSubstream(RngStream g);
+XBT_PUBLIC void RngStream_SetAntithetic(RngStream g, int a);
+XBT_PUBLIC void RngStream_IncreasedPrecis(RngStream g, int incp);
+XBT_PUBLIC int RngStream_SetSeed(RngStream g, unsigned long seed[6]);
+XBT_PUBLIC void RngStream_AdvanceState(RngStream g, long e, long c);
+XBT_PUBLIC void RngStream_GetState(RngStream g, unsigned long seed[6]);
+XBT_PUBLIC void RngStream_WriteState(RngStream g);
+XBT_PUBLIC void RngStream_WriteStateFull(RngStream g);
+XBT_PUBLIC double RngStream_RandU01(RngStream g);
+XBT_PUBLIC int RngStream_RandInt(RngStream g, int i, int j);
 
 SG_END_DECL();
 
index b3494cf..da09fba 100644 (file)
@@ -14,7 +14,7 @@
 #include "xbt/ex.h"
 
 SG_BEGIN_DECL()
-XBT_PUBLIC_DATA(int) xbt_log_no_loc; /* Do not show the backtrace on failed backtrace when doing our tests */
+XBT_PUBLIC_DATA int xbt_log_no_loc; /* Do not show the backtrace on failed backtrace when doing our tests */
 
 /**
  * @addtogroup XBT_error
index a0f9013..f76712c 100644 (file)
@@ -60,57 +60,58 @@ typedef struct xbt_automaton_propositional_symbol* xbt_automaton_propositional_s
 typedef int (*xbt_automaton_propositional_symbol_callback_type)(void*);
 typedef void (*xbt_automaton_propositional_symbol_free_function_type)(void*);
 
-XBT_PUBLIC(xbt_automaton_t) xbt_automaton_new(void);
-XBT_PUBLIC(void) xbt_automaton_load(xbt_automaton_t automaton, const char *file);
-XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_state_new(xbt_automaton_t a, int type, char* id);
-XBT_PUBLIC(xbt_automaton_transition_t)
-    xbt_automaton_transition_new(xbt_automaton_t a, xbt_automaton_state_t src, xbt_automaton_state_t dst,
-                                 xbt_automaton_exp_label_t label);
-XBT_PUBLIC(xbt_automaton_exp_label_t) xbt_automaton_exp_label_new(int type, ...);
-XBT_PUBLIC(xbt_dynar_t) xbt_automaton_get_states(xbt_automaton_t a);
-XBT_PUBLIC(xbt_dynar_t) xbt_automaton_get_transitions(xbt_automaton_t a);
-XBT_PUBLIC(xbt_automaton_transition_t) xbt_automaton_get_transition(xbt_automaton_t a, xbt_automaton_state_t src,
-                                                                    xbt_automaton_state_t dst);
-XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_transition_get_source(xbt_automaton_transition_t t);
-XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_transition_get_destination(xbt_automaton_transition_t t);
-XBT_PUBLIC(void) xbt_automaton_transition_set_source(xbt_automaton_transition_t t, xbt_automaton_state_t src);
-XBT_PUBLIC(void) xbt_automaton_transition_set_destination(xbt_automaton_transition_t t, xbt_automaton_state_t dst);
-XBT_PUBLIC(xbt_dynar_t) xbt_automaton_state_get_out_transitions(xbt_automaton_state_t s);
-XBT_PUBLIC(xbt_dynar_t) xbt_automaton_state_get_in_transitions(xbt_automaton_state_t s);
-XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_state_exists(xbt_automaton_t a, char *id);
-XBT_PUBLIC(void) xbt_automaton_display(xbt_automaton_t a);
-XBT_PUBLIC(void) xbt_automaton_exp_label_display(xbt_automaton_exp_label_t l);
+XBT_PUBLIC xbt_automaton_t xbt_automaton_new(void);
+XBT_PUBLIC void xbt_automaton_load(xbt_automaton_t automaton, const char* file);
+XBT_PUBLIC xbt_automaton_state_t xbt_automaton_state_new(xbt_automaton_t a, int type, char* id);
+XBT_PUBLIC xbt_automaton_transition_t xbt_automaton_transition_new(xbt_automaton_t a, xbt_automaton_state_t src,
+                                                                   xbt_automaton_state_t dst,
+                                                                   xbt_automaton_exp_label_t label);
+XBT_PUBLIC xbt_automaton_exp_label_t xbt_automaton_exp_label_new(int type, ...);
+XBT_PUBLIC xbt_dynar_t xbt_automaton_get_states(xbt_automaton_t a);
+XBT_PUBLIC xbt_dynar_t xbt_automaton_get_transitions(xbt_automaton_t a);
+XBT_PUBLIC xbt_automaton_transition_t xbt_automaton_get_transition(xbt_automaton_t a, xbt_automaton_state_t src,
+                                                                   xbt_automaton_state_t dst);
+XBT_PUBLIC xbt_automaton_state_t xbt_automaton_transition_get_source(xbt_automaton_transition_t t);
+XBT_PUBLIC xbt_automaton_state_t xbt_automaton_transition_get_destination(xbt_automaton_transition_t t);
+XBT_PUBLIC void xbt_automaton_transition_set_source(xbt_automaton_transition_t t, xbt_automaton_state_t src);
+XBT_PUBLIC void xbt_automaton_transition_set_destination(xbt_automaton_transition_t t, xbt_automaton_state_t dst);
+XBT_PUBLIC xbt_dynar_t xbt_automaton_state_get_out_transitions(xbt_automaton_state_t s);
+XBT_PUBLIC xbt_dynar_t xbt_automaton_state_get_in_transitions(xbt_automaton_state_t s);
+XBT_PUBLIC xbt_automaton_state_t xbt_automaton_state_exists(xbt_automaton_t a, char* id);
+XBT_PUBLIC void xbt_automaton_display(xbt_automaton_t a);
+XBT_PUBLIC void xbt_automaton_exp_label_display(xbt_automaton_exp_label_t l);
 
 // xbt_automaton_propositional_symbol constructors:
-XBT_PUBLIC(xbt_automaton_propositional_symbol_t)
-   xbt_automaton_propositional_symbol_new(xbt_automaton_t a, const char* id, int(*fct)(void));
-XBT_PUBLIC(xbt_automaton_propositional_symbol_t)
-   xbt_automaton_propositional_symbol_new_pointer(xbt_automaton_t a, const char* id, int* value);
-XBT_PUBLIC(xbt_automaton_propositional_symbol_t)
-   xbt_automaton_propositional_symbol_new_callback(xbt_automaton_t a, const char* id,
-  xbt_automaton_propositional_symbol_callback_type callback,
-  void* data, xbt_automaton_propositional_symbol_free_function_type free_function);
+XBT_PUBLIC xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_automaton_t a,
+                                                                                       const char* id,
+                                                                                       int (*fct)(void));
+XBT_PUBLIC xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new_pointer(xbt_automaton_t a,
+                                                                                               const char* id,
+                                                                                               int* value);
+XBT_PUBLIC xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new_callback(
+    xbt_automaton_t a, const char* id, xbt_automaton_propositional_symbol_callback_type callback, void* data,
+    xbt_automaton_propositional_symbol_free_function_type free_function);
 
 // xbt_automaton_propositional_symbol accessors:
-XBT_PUBLIC(xbt_automaton_propositional_symbol_callback_type)
-   xbt_automaton_propositional_symbol_get_callback(xbt_automaton_propositional_symbol_t symbol);
-XBT_PUBLIC(void*) xbt_automaton_propositional_symbol_get_data(xbt_automaton_propositional_symbol_t symbol);
-XBT_PUBLIC(const char*) xbt_automaton_propositional_symbol_get_name(xbt_automaton_propositional_symbol_t symbol);
+XBT_PUBLIC xbt_automaton_propositional_symbol_callback_type
+xbt_automaton_propositional_symbol_get_callback(xbt_automaton_propositional_symbol_t symbol);
+XBT_PUBLIC void* xbt_automaton_propositional_symbol_get_data(xbt_automaton_propositional_symbol_t symbol);
+XBT_PUBLIC const char* xbt_automaton_propositional_symbol_get_name(xbt_automaton_propositional_symbol_t symbol);
 
 // xbt_automaton_propositional_symbol methods!
-XBT_PUBLIC(int) xbt_automaton_propositional_symbol_evaluate(xbt_automaton_propositional_symbol_t symbol);
-
-XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_get_current_state(xbt_automaton_t a);
-XBT_PUBLIC(int) xbt_automaton_state_compare(xbt_automaton_state_t s1, xbt_automaton_state_t s2);
-XBT_PUBLIC(int) xbt_automaton_propositional_symbols_compare_value(xbt_dynar_t s1, xbt_dynar_t s2);
-XBT_PUBLIC(int) xbt_automaton_transition_compare(const void *t1, const void *t2);
-XBT_PUBLIC(int) xbt_automaton_exp_label_compare(xbt_automaton_exp_label_t l1, xbt_automaton_exp_label_t l2);
-XBT_PUBLIC(void) xbt_automaton_state_free_voidp(void *s);
-XBT_PUBLIC(void) xbt_automaton_state_free(xbt_automaton_state_t s);
-XBT_PUBLIC(void) xbt_automaton_transition_free_voidp(void *t);
-XBT_PUBLIC(void) xbt_automaton_exp_label_free_voidp(void *e);
-XBT_PUBLIC(void) xbt_automaton_propositional_symbol_free_voidp(void *ps);
-XBT_PUBLIC(void) xbt_automaton_free(xbt_automaton_t a);
+XBT_PUBLIC int xbt_automaton_propositional_symbol_evaluate(xbt_automaton_propositional_symbol_t symbol);
+
+XBT_PUBLIC xbt_automaton_state_t xbt_automaton_get_current_state(xbt_automaton_t a);
+XBT_PUBLIC int xbt_automaton_state_compare(xbt_automaton_state_t s1, xbt_automaton_state_t s2);
+XBT_PUBLIC int xbt_automaton_propositional_symbols_compare_value(xbt_dynar_t s1, xbt_dynar_t s2);
+XBT_PUBLIC int xbt_automaton_transition_compare(const void* t1, const void* t2);
+XBT_PUBLIC int xbt_automaton_exp_label_compare(xbt_automaton_exp_label_t l1, xbt_automaton_exp_label_t l2);
+XBT_PUBLIC void xbt_automaton_state_free_voidp(void* s);
+XBT_PUBLIC void xbt_automaton_state_free(xbt_automaton_state_t s);
+XBT_PUBLIC void xbt_automaton_transition_free_voidp(void* t);
+XBT_PUBLIC void xbt_automaton_exp_label_free_voidp(void* e);
+XBT_PUBLIC void xbt_automaton_propositional_symbol_free_voidp(void* ps);
+XBT_PUBLIC void xbt_automaton_free(xbt_automaton_t a);
 
 SG_END_DECL()
 
index dd4fb3d..6367997 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2005-2018. The SimGrid Team. All rights reserved.          */
 
 #ifndef XBT_BACKTRACE_H
 #define XBT_BACKTRACE_H
@@ -14,19 +14,19 @@ SG_BEGIN_DECL()
 typedef void* xbt_backtrace_location_t;
 
 /** @brief Shows a backtrace of the current location */
-XBT_PUBLIC(void) xbt_backtrace_display_current();
+XBT_PUBLIC void xbt_backtrace_display_current();
 
 /** @brief reimplementation of glibc backtrace based directly on gcc library, without implicit malloc  */
-XBT_PUBLIC(int) xbt_backtrace_no_malloc(void**bt, int size);
+XBT_PUBLIC int xbt_backtrace_no_malloc(void** bt, int size);
 
 /** @brief Captures a backtrace for further use */
-XBT_PUBLIC(size_t) xbt_backtrace_current(xbt_backtrace_location_t* loc, size_t count);
+XBT_PUBLIC size_t xbt_backtrace_current(xbt_backtrace_location_t* loc, size_t count);
 
 /** @brief Display a previously captured backtrace */
-XBT_PUBLIC(void) xbt_backtrace_display(xbt_backtrace_location_t* loc, size_t count);
+XBT_PUBLIC void xbt_backtrace_display(xbt_backtrace_location_t* loc, size_t count);
 
 /** @brief Get current backtrace with libunwind */
-XBT_PUBLIC(int) xbt_libunwind_backtrace(void** bt, int size);
+XBT_PUBLIC int xbt_libunwind_backtrace(void** bt, int size);
 
 SG_END_DECL()
 
index ca3f282..754bd5f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005-2019. The SimGrid Team.
+/* Copyright (c) 2005-2018. The SimGrid Team.
  * All rights reserved. */
 
 #ifndef SIMGRIX_XBT_BACKTRACE_HPP
@@ -20,18 +20,16 @@ namespace xbt {
  *
  *  Return the origin string if this fails.
  */
-XBT_PUBLIC() std::unique_ptr<char, void(*)(void*)> demangle(const char* name);
+XBT_PUBLIC std::unique_ptr<char, void (*)(void*)> demangle(const char* name);
 
 /** Get the current backtrace */
-XBT_PUBLIC(std::vector<xbt_backtrace_location_t>) backtrace();
+XBT_PUBLIC std::vector<xbt_backtrace_location_t> backtrace();
 
 /* Translate the backtrace in a human friendly form
  *
  *  Try ro resolve symbols and source code location.
  */
-XBT_PUBLIC(std::vector<std::string>) resolveBacktrace(
-  xbt_backtrace_location_t const* loc, std::size_t count);
-
+XBT_PUBLIC std::vector<std::string> resolveBacktrace(xbt_backtrace_location_t const* loc, std::size_t count);
 }
 }
 
index 6486466..24f28c2 100644 (file)
 
 /* Build the DLL */
 #if defined(DLL_EXPORT)
-#  define XBT_ATTRIB_PUBLIC           __declspec(dllexport)
-#  define XBT_PUBLIC(type)            __declspec(dllexport) type
-#  define XBT_EXPORT_NO_IMPORT(type)  __declspec(dllexport) type
-#  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA(type)       extern __declspec(dllexport) type
-#  define XBT_PUBLIC_CLASS            class __declspec(dllexport)
+#  define XBT_PUBLIC            __declspec(dllexport)
+#  define XBT_EXPORT_NO_IMPORT  __declspec(dllexport)
+#  define XBT_IMPORT_NO_EXPORT
+#  define XBT_PUBLIC_DATA       extern __declspec(dllexport)
 #  define XBT_PRIVATE
 
 /* Link against the DLL */
 #elif (defined(_WIN32) && !defined(DLL_EXPORT))
-#  define XBT_ATTRIB_PUBLIC           __declspec(dllimport)
-#  define XBT_PUBLIC(type)            __declspec(dllimport) type
-#  define XBT_EXPORT_NO_IMPORT(type)  type
-#  define XBT_IMPORT_NO_EXPORT(type)  __declspec(dllimport) type
-#  define XBT_PUBLIC_DATA(type)       extern __declspec(dllimport) type
-#  define XBT_PUBLIC_CLASS            class __declspec(dllimport)
+#  define XBT_PUBLIC            __declspec(dllimport)
+#  define XBT_EXPORT_NO_IMPORT
+#  define XBT_IMPORT_NO_EXPORT  __declspec(dllimport)
+#  define XBT_PUBLIC_DATA       extern __declspec(dllimport)
 #  define XBT_PRIVATE
 
 #elif defined(__ELF__)
-#  define XBT_ATTRIB_PUBLIC           __attribute__((visibility("default")))
-#  define XBT_PUBLIC(type)            __attribute__((visibility("default"))) type
-#  define XBT_EXPORT_NO_IMPORT(type)  __attribute__((visibility("default"))) type
-#  define XBT_IMPORT_NO_EXPORT(type)  __attribute__((visibility("default"))) type
-#  define XBT_PUBLIC_DATA(type)       extern __attribute__((visibility("default"))) type
-#  define XBT_PUBLIC_CLASS            class __attribute__((visibility("default")))
-#  define XBT_PRIVATE                 __attribute__((visibility("hidden")))
+#  define XBT_PUBLIC            __attribute__((visibility("default")))
+#  define XBT_EXPORT_NO_IMPORT  __attribute__((visibility("default")))
+#  define XBT_IMPORT_NO_EXPORT  __attribute__((visibility("default")))
+#  define XBT_PUBLIC_DATA       extern __attribute__((visibility("default")))
+#  define XBT_PRIVATE           __attribute__((visibility("hidden")))
 
 #else
-#  define XBT_ATTRIB_PUBLIC           /* public */
-#  define XBT_PUBLIC(type)            type
-#  define XBT_EXPORT_NO_IMPORT(type)  type
-#  define XBT_IMPORT_NO_EXPORT(type)  type
-#  define XBT_PUBLIC_DATA(type)       extern type
-#  define XBT_PUBLIC_CLASS            class
-#  define XBT_PRIVATE                 /** @private */
+#  define XBT_PUBLIC            /* public */
+#  define XBT_EXPORT_NO_IMPORT
+#  define XBT_IMPORT_NO_EXPORT
+#  define XBT_PUBLIC_DATA       extern
+#  define XBT_PRIVATE           /** @private */
 
 #endif
 
index 4ad8e1f..c5f9480 100644 (file)
@@ -1,7 +1,7 @@
 /* config - Dictionary where the type of each cell is provided.             */
 /* This is useful to build named structs, like option or property sets.     */
 
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -67,26 +67,26 @@ typedef void* xbt_cfg_t;
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) xbt_cfg_set_parse(const char *options);
+XBT_PUBLIC void xbt_cfg_set_parse(const char* options);
 
 /* Set the value of the cell \a name in \a cfg with the provided value.*/
-XBT_PUBLIC(void) xbt_cfg_set_int       (const char *name, int val);
-XBT_PUBLIC(void) xbt_cfg_set_double    (const char *name, double val);
-XBT_PUBLIC(void) xbt_cfg_set_boolean   (const char *name, const char *val);
-XBT_PUBLIC(void) xbt_cfg_set_string(const char* name, const char* val);
-XBT_PUBLIC(void) xbt_cfg_set_as_string(const char *name, const char *val);
+XBT_PUBLIC void xbt_cfg_set_int(const char* name, int val);
+XBT_PUBLIC void xbt_cfg_set_double(const char* name, double val);
+XBT_PUBLIC void xbt_cfg_set_boolean(const char* name, const char* val);
+XBT_PUBLIC void xbt_cfg_set_string(const char* name, const char* val);
+XBT_PUBLIC void xbt_cfg_set_as_string(const char* name, const char* val);
 
 /*
   Set the default value of the cell \a name in \a cfg with the provided value.
   If it was already set to something (possibly from the command line), do nothing.
  */
-XBT_PUBLIC(void) xbt_cfg_setdefault_int    (const char *name, int val);
-XBT_PUBLIC(void) xbt_cfg_setdefault_double (const char *name, double val);
-XBT_PUBLIC(void) xbt_cfg_setdefault_string (const char *name, const char *val);
-XBT_PUBLIC(void) xbt_cfg_setdefault_boolean(const char *name, const char *val);
+XBT_PUBLIC void xbt_cfg_setdefault_int(const char* name, int val);
+XBT_PUBLIC void xbt_cfg_setdefault_double(const char* name, double val);
+XBT_PUBLIC void xbt_cfg_setdefault_string(const char* name, const char* val);
+XBT_PUBLIC void xbt_cfg_setdefault_boolean(const char* name, const char* val);
 
 /** @brief Return if configuration is set by default*/
-XBT_PUBLIC(int) xbt_cfg_is_default_value(const char *name);
+XBT_PUBLIC int xbt_cfg_is_default_value(const char* name);
 
 /* @} */
 
@@ -97,13 +97,13 @@ XBT_PUBLIC(int) xbt_cfg_is_default_value(const char *name);
  */
 
 /** \brief Callback types. They get the name of the modified entry, and the position of the changed value */
-typedef void (*xbt_cfg_cb_t) (const char * name);
+typedef void (*xbt_cfg_cb_t)(const char* name);
 
-XBT_PUBLIC(xbt_cfg_t) xbt_cfg_new();
-XBT_PUBLIC(void) xbt_cfg_free(xbt_cfg_t * cfg);
-XBT_PUBLIC(void) xbt_cfg_dump(const char *name, const char *indent, xbt_cfg_t cfg);
+XBT_PUBLIC xbt_cfg_t xbt_cfg_new();
+XBT_PUBLIC void xbt_cfg_free(xbt_cfg_t* cfg);
+XBT_PUBLIC void xbt_cfg_dump(const char* name, const char* indent, xbt_cfg_t cfg);
 
- /** @} */
+/** @} */
 
 /** @defgroup XBT_cfg_register  Registering stuff
  *  @ingroup XBT_config
@@ -112,14 +112,16 @@ XBT_PUBLIC(void) xbt_cfg_dump(const char *name, const char *indent, xbt_cfg_t cf
  *
  *  @{
  */
-XBT_PUBLIC(void) xbt_cfg_register_double (const char *name, double default_val,    xbt_cfg_cb_t cb_set, const char *desc);
-XBT_PUBLIC(void) xbt_cfg_register_int    (const char *name, int default_val,       xbt_cfg_cb_t cb_set, const char *desc);
-XBT_PUBLIC(void) xbt_cfg_register_string (const char *name, const char*default_val,xbt_cfg_cb_t cb_set, const char *desc);
-XBT_PUBLIC(void) xbt_cfg_register_boolean(const char *name, const char*default_val,xbt_cfg_cb_t cb_set, const char *desc);
-XBT_PUBLIC(void) xbt_cfg_register_alias(const char *newname, const char *oldname);
+XBT_PUBLIC void xbt_cfg_register_double(const char* name, double default_val, xbt_cfg_cb_t cb_set, const char* desc);
+XBT_PUBLIC void xbt_cfg_register_int(const char* name, int default_val, xbt_cfg_cb_t cb_set, const char* desc);
+XBT_PUBLIC void xbt_cfg_register_string(const char* name, const char* default_val, xbt_cfg_cb_t cb_set,
+                                        const char* desc);
+XBT_PUBLIC void xbt_cfg_register_boolean(const char* name, const char* default_val, xbt_cfg_cb_t cb_set,
+                                         const char* desc);
+XBT_PUBLIC void xbt_cfg_register_alias(const char* newname, const char* oldname);
 
-XBT_PUBLIC(void) xbt_cfg_aliases();
-XBT_PUBLIC(void) xbt_cfg_help();
+XBT_PUBLIC void xbt_cfg_aliases();
+XBT_PUBLIC void xbt_cfg_help();
 
 /*  @} */
 /** @defgroup XBT_cfg_get Getting the stored values
@@ -135,9 +137,9 @@ XBT_PUBLIC(void) xbt_cfg_help();
  *  @{
  */
 
-XBT_PUBLIC(int)    xbt_cfg_get_int(const char *name);
-XBT_PUBLIC(double) xbt_cfg_get_double(const char *name);
-XBT_PUBLIC(int)    xbt_cfg_get_boolean(const char *name);
+XBT_PUBLIC int xbt_cfg_get_int(const char* name);
+XBT_PUBLIC double xbt_cfg_get_double(const char* name);
+XBT_PUBLIC int xbt_cfg_get_boolean(const char* name);
 
 /** @} */
 
index d457e57..a4e7517 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2016-2018. 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. */
@@ -23,7 +23,7 @@
 namespace simgrid {
 namespace config {
 
-XBT_PUBLIC_CLASS missing_key_error : public std::runtime_error {
+class XBT_PUBLIC missing_key_error : public std::runtime_error {
 public:
   explicit missing_key_error(const std::string& what)
     : std::runtime_error(what) {}
@@ -52,13 +52,12 @@ inline std::string to_string(std::string&& value)
 
 // Get config
 
-template<class T>
-XBT_PUBLIC(T const&) getConfig(const char* name);
+template <class T> XBT_PUBLIC T const& getConfig(const char* name);
 
-extern template XBT_PUBLIC(int const&) getConfig<int>(const char* name);
-extern template XBT_PUBLIC(double const&) getConfig<double>(const char* name);
-extern template XBT_PUBLIC(bool const&) getConfig<bool>(const char* name);
-extern template XBT_PUBLIC(std::string const&) getConfig<std::string>(const char* name);
+extern template XBT_PUBLIC int const& getConfig<int>(const char* name);
+extern template XBT_PUBLIC double const& getConfig<double>(const char* name);
+extern template XBT_PUBLIC bool const& getConfig<bool>(const char* name);
+extern template XBT_PUBLIC std::string const& getConfig<std::string>(const char* name);
 
 // Register:
 
@@ -69,22 +68,22 @@ extern template XBT_PUBLIC(std::string const&) getConfig<std::string>(const char
  *  @param value       Initial/default value
  *  @param callback    called with the option value
  */
-template<class T>
-XBT_PUBLIC(void) declareFlag(const char* name, const char* description,
-  T value, std::function<void(const T&)> callback = std::function<void(const T&)>());
-
-extern template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, int value, std::function<void(int const &)> callback);
-extern template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, double value, std::function<void(double const &)> callback);
-extern template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, bool value, std::function<void(bool const &)> callback);
-extern template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, std::string value, std::function<void(std::string const &)> callback);
+template <class T>
+XBT_PUBLIC void declareFlag(const char* name, const char* description, T value,
+                            std::function<void(const T&)> callback = std::function<void(const T&)>());
+
+extern template XBT_PUBLIC void declareFlag(const char* name, const char* description, int value,
+                                            std::function<void(int const&)> callback);
+extern template XBT_PUBLIC void declareFlag(const char* name, const char* description, double value,
+                                            std::function<void(double const&)> callback);
+extern template XBT_PUBLIC void declareFlag(const char* name, const char* description, bool value,
+                                            std::function<void(bool const&)> callback);
+extern template XBT_PUBLIC void declareFlag(const char* name, const char* description, std::string value,
+                                            std::function<void(std::string const&)> callback);
 
 // ***** alias *****
 
-XBT_PUBLIC(void) alias(const char* realname, const char* aliasname);
+XBT_PUBLIC void alias(const char* realname, const char* aliasname);
 
 inline
 void alias(std::initializer_list<const char*> names)
@@ -238,6 +237,6 @@ public:
 
 }
 }
-XBT_PUBLIC(std::string) xbt_cfg_get_string(const char* name);
+XBT_PUBLIC std::string xbt_cfg_get_string(const char* name);
 
 #endif
index 24b4449..0edb99d 100644 (file)
@@ -1,6 +1,6 @@
 /* cunit - A little C Unit facility                                         */
 
-/* Copyright (c) 2005-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2005-2018. 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. */
@@ -27,8 +27,8 @@ typedef struct s_xbt_test_unit *xbt_test_unit_t;
 typedef void (*ts_test_cb_t) ();
 
 /* test suite operations */
-XBT_PUBLIC(xbt_test_suite_t) xbt_test_suite_by_name(const char *name, const char *fmt, ...);
-XBT_PUBLIC(void) xbt_test_suite_push(xbt_test_suite_t suite, const char *name, ts_test_cb_t func, const char *fmt, ...);
+XBT_PUBLIC xbt_test_suite_t xbt_test_suite_by_name(const char* name, const char* fmt, ...);
+XBT_PUBLIC void xbt_test_suite_push(xbt_test_suite_t suite, const char* name, ts_test_cb_t func, const char* fmt, ...);
 
 /* Run all the specified tests. what_to_do allows to disable some tests.
  * It is a coma (,) separated list of directives. They are applied from left to right.
@@ -46,11 +46,11 @@ XBT_PUBLIC(void) xbt_test_suite_push(xbt_test_suite_t suite, const char *name, t
  * * testname: if given, the test on which the directive acts. If not, acts on any tests.
  */
 
-XBT_PUBLIC(int) xbt_test_run(char *selection, int verbosity);
+XBT_PUBLIC int xbt_test_run(char* selection, int verbosity);
 /* Show information about the selection of tests */
-XBT_PUBLIC(void) xbt_test_dump(char *selection);
+XBT_PUBLIC void xbt_test_dump(char* selection);
 /* Cleanup the mess */
-XBT_PUBLIC(void) xbt_test_exit();
+XBT_PUBLIC void xbt_test_exit();
 
 /**
  * @addtogroup XBT_cunit
@@ -96,9 +96,9 @@ XBT_PUBLIC(void) xbt_test_exit();
 #endif
 
 /* test operations */
-XBT_PUBLIC(void) _xbt_test_add(const char *file, int line, const char *fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
-XBT_PUBLIC(void) _xbt_test_fail(const char *file, int line, const char *fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
-XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
+XBT_PUBLIC void _xbt_test_add(const char* file, int line, const char* fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
+XBT_PUBLIC void _xbt_test_fail(const char* file, int line, const char* fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
+XBT_PUBLIC void _xbt_test_log(const char* file, int line, const char* fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
 /** @brief Declare that a new test begins (printf-like parameters, describing the test)
  *  @hideinitializer */
 #define xbt_test_add(...)       _xbt_test_add(__FILE__, __LINE__, __VA_ARGS__)
@@ -124,12 +124,12 @@ XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt, ...)
 #define xbt_test_log(...)       _xbt_test_log(__FILE__, __LINE__, __VA_ARGS__)
 
 /** @brief Declare that the lastly started test failed because of the provided exception */
-XBT_PUBLIC(void) xbt_test_exception(xbt_ex_t e);
+XBT_PUBLIC void xbt_test_exception(xbt_ex_t e);
 
 /** @brief Declare that the lastly started test was expected to fail (and actually failed) */
-XBT_PUBLIC(void) xbt_test_expect_failure();
+XBT_PUBLIC void xbt_test_expect_failure();
 /** @brief Declare that the lastly started test should be skipped today */
-XBT_PUBLIC(void) xbt_test_skip();
+XBT_PUBLIC void xbt_test_skip();
 
 /** @} */
 
index 30f9ec3..3c27e58 100644 (file)
@@ -55,9 +55,9 @@ typedef struct s_xbt_dictelm {
   xbt_dictelm_t next;
 } s_xbt_dictelm_t;
 
-XBT_PUBLIC(xbt_dict_t) xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn);
-XBT_PUBLIC(void) xbt_dict_free(xbt_dict_t * dict);
-XBT_PUBLIC(unsigned int) xbt_dict_size(xbt_dict_t dict);
+XBT_PUBLIC xbt_dict_t xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn);
+XBT_PUBLIC void xbt_dict_free(xbt_dict_t* dict);
+XBT_PUBLIC unsigned int xbt_dict_size(xbt_dict_t dict);
 
 /** @} */
 /** @defgroup XBT_dict_basic Dictionaries basic usage
@@ -68,24 +68,24 @@ XBT_PUBLIC(unsigned int) xbt_dict_size(xbt_dict_t dict);
  *  @{
  */
 
-XBT_PUBLIC(void) xbt_dict_set(xbt_dict_t dict, const char *key, void *data, void_f_pvoid_t free_ctn);
-XBT_PUBLIC(void *) xbt_dict_get(xbt_dict_t dict, const char *key);
-XBT_PUBLIC(void *) xbt_dict_get_or_null(xbt_dict_t dict, const char *key);
-XBT_PUBLIC(char*) xbt_dict_get_key(xbt_dict_t dict, const void* data);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC(char*)
-    xbt_dict_get_elm_key(xbt_dictelm_t elem);
-XBT_PUBLIC(xbt_dictelm_t) xbt_dict_get_elm(xbt_dict_t dict, const char *key);
-XBT_PUBLIC(xbt_dictelm_t) xbt_dict_get_elm_or_null(xbt_dict_t dict, const char *key);
-
-XBT_PUBLIC(void) xbt_dict_remove(xbt_dict_t dict, const char *key);
-XBT_PUBLIC(void) xbt_dict_reset(xbt_dict_t dict);
-XBT_PUBLIC(int) xbt_dict_length(xbt_dict_t dict);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC(void)
-    xbt_dict_dump_output_string(void* s);
-XBT_PUBLIC(void) xbt_dict_dump(xbt_dict_t dict, void (*output) (void *));
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC(void)
-    xbt_dict_dump_sizes(xbt_dict_t dict);
-XBT_PUBLIC(int) xbt_dict_is_empty(xbt_dict_t dict);
+XBT_PUBLIC void xbt_dict_set(xbt_dict_t dict, const char* key, void* data, void_f_pvoid_t free_ctn);
+XBT_PUBLIC void* xbt_dict_get(xbt_dict_t dict, const char* key);
+XBT_PUBLIC void* xbt_dict_get_or_null(xbt_dict_t dict, const char* key);
+XBT_PUBLIC char* xbt_dict_get_key(xbt_dict_t dict, const void* data);
+XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
+    char* xbt_dict_get_elm_key(xbt_dictelm_t elem);
+XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm(xbt_dict_t dict, const char* key);
+XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm_or_null(xbt_dict_t dict, const char* key);
+
+XBT_PUBLIC void xbt_dict_remove(xbt_dict_t dict, const char* key);
+XBT_PUBLIC void xbt_dict_reset(xbt_dict_t dict);
+XBT_PUBLIC int xbt_dict_length(xbt_dict_t dict);
+XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
+    void xbt_dict_dump_output_string(void* s);
+XBT_PUBLIC void xbt_dict_dump(xbt_dict_t dict, void (*output)(void*));
+XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
+    void xbt_dict_dump_sizes(xbt_dict_t dict);
+XBT_PUBLIC int xbt_dict_is_empty(xbt_dict_t dict);
 
 /** @} */
 /** @defgroup XBT_dict_nnul Dictionaries with non-nul terminated keys
@@ -95,10 +95,10 @@ XBT_PUBLIC(int) xbt_dict_is_empty(xbt_dict_t dict);
  *
  *  @{
  */
-XBT_PUBLIC(void) xbt_dict_set_ext(xbt_dict_t dict, const char *key, int key_len, void *data, void_f_pvoid_t free_ctn);
-XBT_PUBLIC(void*) xbt_dict_get_ext(xbt_dict_t dict, const char* key, int key_len);
-XBT_PUBLIC(void*) xbt_dict_get_or_null_ext(xbt_dict_t dict, const char* key, int key_len);
-XBT_PUBLIC(void) xbt_dict_remove_ext(xbt_dict_t dict, const char *key, int key_len);
+XBT_PUBLIC void xbt_dict_set_ext(xbt_dict_t dict, const char* key, int key_len, void* data, void_f_pvoid_t free_ctn);
+XBT_PUBLIC void* xbt_dict_get_ext(xbt_dict_t dict, const char* key, int key_len);
+XBT_PUBLIC void* xbt_dict_get_or_null_ext(xbt_dict_t dict, const char* key, int key_len);
+XBT_PUBLIC void xbt_dict_remove_ext(xbt_dict_t dict, const char* key, int key_len);
 
 struct s_xbt_dict_cursor {
   xbt_dictelm_t current;
@@ -135,19 +135,19 @@ static inline xbt_dictelm_t xbt_dict_cursor_get_elm(xbt_dict_cursor_t cursor) {
   return cursor->current;
 }
 
-XBT_PUBLIC(xbt_dict_cursor_t) xbt_dict_cursor_new(const xbt_dict_t dict);
-XBT_PUBLIC(void) xbt_dict_cursor_free(xbt_dict_cursor_t * cursor);
+XBT_PUBLIC xbt_dict_cursor_t xbt_dict_cursor_new(const xbt_dict_t dict);
+XBT_PUBLIC void xbt_dict_cursor_free(xbt_dict_cursor_t* cursor);
 
-XBT_PUBLIC(void) xbt_dict_cursor_rewind(xbt_dict_cursor_t cursor);
+XBT_PUBLIC void xbt_dict_cursor_rewind(xbt_dict_cursor_t cursor);
 
-XBT_PUBLIC(char *) xbt_dict_cursor_get_key(xbt_dict_cursor_t cursor);
-XBT_PUBLIC(void *) xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC(void)
-    xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor, void* data, void_f_pvoid_t free_ctn);
+XBT_PUBLIC char* xbt_dict_cursor_get_key(xbt_dict_cursor_t cursor);
+XBT_PUBLIC void* xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor);
+XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
+    void xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor, void* data, void_f_pvoid_t free_ctn);
 
-XBT_PUBLIC(void) xbt_dict_cursor_first(const xbt_dict_t dict, xbt_dict_cursor_t * cursor);
-XBT_PUBLIC(void) xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
-XBT_PUBLIC(int) xbt_dict_cursor_get_or_free(xbt_dict_cursor_t * cursor, char **key, void **data);
+XBT_PUBLIC void xbt_dict_cursor_first(const xbt_dict_t dict, xbt_dict_cursor_t* cursor);
+XBT_PUBLIC void xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
+XBT_PUBLIC int xbt_dict_cursor_get_or_free(xbt_dict_cursor_t* cursor, char** key, void** data);
 /** @def xbt_dict_foreach
  *  @param dict a \ref xbt_dict_t iterator
  *  @param cursor an \ref xbt_dict_cursor_t used as cursor
index 5484ccd..89e9597 100644 (file)
@@ -1,6 +1,6 @@
 /* dynar - a generic dynamic array                                          */
 
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -64,14 +64,14 @@ SG_BEGIN_DECL()
    /** \brief Dynar data type (opaque type) */
 typedef struct xbt_dynar_s *xbt_dynar_t;
 
-XBT_PUBLIC(xbt_dynar_t) xbt_dynar_new(const unsigned long elm_size, void_f_pvoid_t const free_f);
-XBT_PUBLIC(void) xbt_dynar_init(xbt_dynar_t dynar, const unsigned long elmsize, void_f_pvoid_t const free_f);
-XBT_PUBLIC(void) xbt_dynar_free(xbt_dynar_t * dynar);
-XBT_PUBLIC(void) xbt_dynar_free_voidp(void *dynar);
-XBT_PUBLIC(void) xbt_dynar_free_container(xbt_dynar_t * dynar);
-XBT_PUBLIC(void) xbt_dynar_free_data(xbt_dynar_t dynar);
-XBT_PUBLIC(void) xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots);
-XBT_PUBLIC(void) xbt_dynar_dump(xbt_dynar_t dynar);
+XBT_PUBLIC xbt_dynar_t xbt_dynar_new(const unsigned long elm_size, void_f_pvoid_t const free_f);
+XBT_PUBLIC void xbt_dynar_init(xbt_dynar_t dynar, const unsigned long elmsize, void_f_pvoid_t const free_f);
+XBT_PUBLIC void xbt_dynar_free(xbt_dynar_t* dynar);
+XBT_PUBLIC void xbt_dynar_free_voidp(void* dynar);
+XBT_PUBLIC void xbt_dynar_free_container(xbt_dynar_t* dynar);
+XBT_PUBLIC void xbt_dynar_free_data(xbt_dynar_t dynar);
+XBT_PUBLIC void xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots);
+XBT_PUBLIC void xbt_dynar_dump(xbt_dynar_t dynar);
 
 /** @} */
 /** @defgroup XBT_dynar_array Dynar as a regular array
@@ -80,21 +80,21 @@ XBT_PUBLIC(void) xbt_dynar_dump(xbt_dynar_t dynar);
  *  @{
  */
 
-XBT_PUBLIC(void) xbt_dynar_get_cpy(const xbt_dynar_t dynar, const unsigned long idx, void *const dst);
-XBT_PUBLIC(void) xbt_dynar_set(xbt_dynar_t dynar, const int idx, const void *src);
-XBT_PUBLIC(void) xbt_dynar_replace(xbt_dynar_t dynar, const unsigned long idx, const void *object);
+XBT_PUBLIC void xbt_dynar_get_cpy(const xbt_dynar_t dynar, const unsigned long idx, void* const dst);
+XBT_PUBLIC void xbt_dynar_set(xbt_dynar_t dynar, const int idx, const void* src);
+XBT_PUBLIC void xbt_dynar_replace(xbt_dynar_t dynar, const unsigned long idx, const void* object);
 
-XBT_PUBLIC(void) xbt_dynar_insert_at(xbt_dynar_t const dynar, const int idx, const void *src);
-XBT_PUBLIC(void) xbt_dynar_remove_at(xbt_dynar_t const dynar, const int idx, void *const dst);
-XBT_PUBLIC(void) xbt_dynar_remove_n_at(xbt_dynar_t const dynar, const unsigned int n, const int idx);
+XBT_PUBLIC void xbt_dynar_insert_at(xbt_dynar_t const dynar, const int idx, const void* src);
+XBT_PUBLIC void xbt_dynar_remove_at(xbt_dynar_t const dynar, const int idx, void* const dst);
+XBT_PUBLIC void xbt_dynar_remove_n_at(xbt_dynar_t const dynar, const unsigned int n, const int idx);
 
-XBT_PUBLIC(unsigned int) xbt_dynar_search(xbt_dynar_t const dynar, void *elem);
-XBT_PUBLIC(signed int) xbt_dynar_search_or_negative(xbt_dynar_t const dynar, void *const elem);
-XBT_PUBLIC(int) xbt_dynar_member(xbt_dynar_t const dynar, void *elem);
-XBT_PUBLIC(void) xbt_dynar_sort(xbt_dynar_t const dynar, int_f_cpvoid_cpvoid_t compar_fn);
-XBT_PUBLIC(xbt_dynar_t) xbt_dynar_sort_strings(xbt_dynar_t dynar);
-XBT_PUBLIC(int) xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2, int(*compar)(const void *, const void *));
-XBT_PUBLIC(void *) xbt_dynar_to_array (xbt_dynar_t dynar);
+XBT_PUBLIC unsigned int xbt_dynar_search(xbt_dynar_t const dynar, void* elem);
+XBT_PUBLIC signed int xbt_dynar_search_or_negative(xbt_dynar_t const dynar, void* const elem);
+XBT_PUBLIC int xbt_dynar_member(xbt_dynar_t const dynar, void* elem);
+XBT_PUBLIC void xbt_dynar_sort(xbt_dynar_t const dynar, int_f_cpvoid_cpvoid_t compar_fn);
+XBT_PUBLIC xbt_dynar_t xbt_dynar_sort_strings(xbt_dynar_t dynar);
+XBT_PUBLIC int xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2, int (*compar)(const void*, const void*));
+XBT_PUBLIC void* xbt_dynar_to_array(xbt_dynar_t dynar);
 
 /** @} */
 /** @defgroup XBT_dynar_misc Dynar miscellaneous functions
@@ -103,10 +103,10 @@ XBT_PUBLIC(void *) xbt_dynar_to_array (xbt_dynar_t dynar);
  *  @{
  */
 
-XBT_PUBLIC(unsigned long) xbt_dynar_length(const xbt_dynar_t dynar);
-XBT_PUBLIC(int) xbt_dynar_is_empty(const xbt_dynar_t dynar);
-XBT_PUBLIC(void) xbt_dynar_reset(xbt_dynar_t const dynar);
-XBT_PUBLIC(void) xbt_dynar_merge(xbt_dynar_t *d1, xbt_dynar_t *d2);
+XBT_PUBLIC unsigned long xbt_dynar_length(const xbt_dynar_t dynar);
+XBT_PUBLIC int xbt_dynar_is_empty(const xbt_dynar_t dynar);
+XBT_PUBLIC void xbt_dynar_reset(xbt_dynar_t const dynar);
+XBT_PUBLIC void xbt_dynar_merge(xbt_dynar_t* d1, xbt_dynar_t* d2);
 
 /** @} */
 /** @defgroup XBT_dynar_perl Perl-like use of dynars
@@ -115,11 +115,11 @@ XBT_PUBLIC(void) xbt_dynar_merge(xbt_dynar_t *d1, xbt_dynar_t *d2);
  *  @{
  */
 
-XBT_PUBLIC(void) xbt_dynar_push(xbt_dynar_t const dynar, const void *src);
-XBT_PUBLIC(void) xbt_dynar_pop(xbt_dynar_t const dynar, void *const dst);
-XBT_PUBLIC(void) xbt_dynar_unshift(xbt_dynar_t const dynar, const void *src);
-XBT_PUBLIC(void) xbt_dynar_shift(xbt_dynar_t const dynar, void *const dst);
-XBT_PUBLIC(void) xbt_dynar_map(const xbt_dynar_t dynar, void_f_pvoid_t const op);
+XBT_PUBLIC void xbt_dynar_push(xbt_dynar_t const dynar, const void* src);
+XBT_PUBLIC void xbt_dynar_pop(xbt_dynar_t const dynar, void* const dst);
+XBT_PUBLIC void xbt_dynar_unshift(xbt_dynar_t const dynar, const void* src);
+XBT_PUBLIC void xbt_dynar_shift(xbt_dynar_t const dynar, void* const dst);
+XBT_PUBLIC void xbt_dynar_map(const xbt_dynar_t dynar, void_f_pvoid_t const op);
 
 /** @} */
 /** @defgroup XBT_dynar_ctn Direct manipulation to the dynars content
@@ -130,11 +130,11 @@ XBT_PUBLIC(void) xbt_dynar_map(const xbt_dynar_t dynar, void_f_pvoid_t const op)
  *  @{
  */
 
-XBT_PUBLIC(void *) xbt_dynar_set_at_ptr(const xbt_dynar_t dynar, const unsigned long idx);
-XBT_PUBLIC(void *) xbt_dynar_get_ptr(const xbt_dynar_t dynar, const unsigned long idx);
-XBT_PUBLIC(void *) xbt_dynar_insert_at_ptr(xbt_dynar_t const dynar, const int idx);
-XBT_PUBLIC(void *) xbt_dynar_push_ptr(xbt_dynar_t const dynar);
-XBT_PUBLIC(void *) xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
+XBT_PUBLIC void* xbt_dynar_set_at_ptr(const xbt_dynar_t dynar, const unsigned long idx);
+XBT_PUBLIC void* xbt_dynar_get_ptr(const xbt_dynar_t dynar, const unsigned long idx);
+XBT_PUBLIC void* xbt_dynar_insert_at_ptr(xbt_dynar_t const dynar, const int idx);
+XBT_PUBLIC void* xbt_dynar_push_ptr(xbt_dynar_t const dynar);
+XBT_PUBLIC void* xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
 
 /** @} */
 /** @defgroup XBT_dynar_speed Speed optimized access to dynars of scalars
@@ -187,7 +187,7 @@ XBT_PUBLIC(void *) xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
  *  @{
  */
 
-XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar, unsigned int *const cursor);
+XBT_PUBLIC void xbt_dynar_cursor_rm(xbt_dynar_t dynar, unsigned int* const cursor);
 
 /*
  * \warning DO NOT USE THIS STRUCTURE DIRECTLY! Instead, use the public interface:
@@ -205,7 +205,7 @@ typedef struct xbt_dynar_s {
   void_f_pvoid_t free_f;
 } s_xbt_dynar_t;
 
-static inline int _xbt_dynar_cursor_get(const xbt_dynar_t dynar, unsigned int idx, void *const dst)
+static inline int _xbt_dynar_cursor_get(const xbt_dynar_t dynar, unsigned int idx, voidconst dst)
 {
   if (!dynar) /* iterating over a NULL dynar is a no-op */
     return FALSE;
index 78ade07..5a4e63e 100644 (file)
@@ -1,44 +1,8 @@
-/* Copyright (c) 2005-2017. The SimGrid Team.
+/* Copyright (c) 2005-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
-/*  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>       */
-/*  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>         */
-/*  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>           */
-/*  All rights reserved.                                                    */
-
-/* This code is inspirated from the OSSP version (as retrieved back in 2004)*/
-/* It was heavily modified to fit the SimGrid framework.                    */
-
-/* The OSSP version has the following copyright notice:
-**  OSSP ex - Exception Handling
-**  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>
-**  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>
-**  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>
-**
-**  This file is part of OSSP ex, an exception handling library
-**  which can be found at http://www.ossp.org/pkg/lib/ex/.
-**
-**  Permission to use, copy, modify, and distribute this software for
-**  any purpose with or without fee is hereby granted, provided that
-**  the above copyright notice and this permission notice appear in all
-**  copies.
-**
-**  THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESSED OR IMPLIED
-**  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-**  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-**  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
-**  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-**  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-**  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-**  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-**  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-**  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-**  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-**  SUCH DAMAGE.
- */
-
-/* The extensions made for the SimGrid project can either be distributed    */
-/* under the same license, or under the LGPL v2.1                           */
+/* 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. */
 
 #ifndef XBT_EX_H
 #define XBT_EX_H
@@ -87,13 +51,13 @@ SG_BEGIN_DECL()
 /** Get the name of a category
  *  @ingroup XBT_ex_c
  */
-XBT_PUBLIC(const char *) xbt_ex_catname(xbt_errcat_t cat);
+XBT_PUBLIC const char* xbt_ex_catname(xbt_errcat_t cat);
 
 typedef struct xbt_ex xbt_ex_t;
 
 /** Helper function used to throw exceptions in C */
-XBT_ATTRIB_NORETURN XBT_PUBLIC(void)
-    _xbt_throw(char* message, xbt_errcat_t errcat, int value, const char* file, int line, const char* func);
+XBT_ATTRIB_NORETURN XBT_PUBLIC void _xbt_throw(char* message, xbt_errcat_t errcat, int value, const char* file,
+                                               int line, const char* func);
 
 /** Builds and throws an exception
  *  @ingroup XBT_ex_c
@@ -131,7 +95,7 @@ XBT_ATTRIB_NORETURN XBT_PUBLIC(void)
 #define DIE_IMPOSSIBLE xbt_die("The Impossible Did Happen (yet again)")
 
 /** Display an exception */
-XBT_PUBLIC(void) xbt_ex_display(xbt_ex_t * e);
+XBT_PUBLIC void xbt_ex_display(xbt_ex_t* e);
 
 SG_END_DECL()
 
index 7e64973..1f7d0e1 100644 (file)
@@ -1,44 +1,8 @@
-/* Copyright (c) 2005-2017. The SimGrid Team.
+/* Copyright (c) 2005-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
-/*  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>       */
-/*  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>         */
-/*  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>           */
-/*  All rights reserved.                                                    */
-
-/* This code is inspirated from the OSSP version (as retrieved back in 2004)*/
-/* It was heavily modified to fit the SimGrid framework.                    */
-
-/* The OSSP version has the following copyright notice:
-**  OSSP ex - Exception Handling
-**  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>
-**  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>
-**  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>
-**
-**  This file is part of OSSP ex, an exception handling library
-**  which can be found at http://www.ossp.org/pkg/lib/ex/.
-**
-**  Permission to use, copy, modify, and distribute this software for
-**  any purpose with or without fee is hereby granted, provided that
-**  the above copyright notice and this permission notice appear in all
-**  copies.
-**
-**  THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESSED OR IMPLIED
-**  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-**  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-**  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
-**  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-**  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-**  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-**  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-**  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-**  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-**  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-**  SUCH DAMAGE.
- */
-
-/* The extensions made for the SimGrid project can either be distributed    */
-/* under the same license, or under the LGPL v2.1                           */
+/* 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. */
 
 #ifndef SIMGRID_XBT_EX_HPP
 #define SIMGRID_XBT_EX_HPP
  *
  *  @ingroup XBT_ex_c
  */
-struct XBT_PUBLIC() xbt_ex :
-  std::runtime_error,
-  simgrid::xbt::WithContextException {
-
+class XBT_PUBLIC xbt_ex : public std::runtime_error, public simgrid::xbt::WithContextException {
+public:
   xbt_ex() :
     std::runtime_error("")
   {}
index 3d648a1..8fa032d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005-2017. The SimGrid Team.All rights reserved. */
+/* Copyright (c) 2005-2018. 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. */
@@ -65,7 +65,7 @@ class ThrowPoint {
  *  However, you can try `dynamic_cast` an exception to this type in order to
  *  get contextual information about the exception.
  */
-XBT_PUBLIC_CLASS WithContextException {
+class XBT_PUBLIC WithContextException {
 public:
   WithContextException() :
     backtrace_(simgrid::xbt::backtrace()),
index 91ad42f..5346279 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -50,24 +50,24 @@ typedef struct xbt_graph {
 } s_xbt_graph_t;
 
 /* API */
-XBT_PUBLIC(xbt_graph_t) xbt_graph_new_graph(unsigned short int directed, void *data);
-XBT_PUBLIC(xbt_node_t) xbt_graph_new_node(xbt_graph_t g, void *data);
-XBT_PUBLIC(xbt_edge_t) xbt_graph_new_edge(xbt_graph_t g, xbt_node_t src, xbt_node_t dst, void *data);
-XBT_PUBLIC(void *) xbt_graph_node_get_data(xbt_node_t node);
-XBT_PUBLIC(void) xbt_graph_node_set_data(xbt_node_t node, void *data);
-XBT_PUBLIC(void *) xbt_graph_edge_get_data(xbt_edge_t edge);
-XBT_PUBLIC(void) xbt_graph_edge_set_data(xbt_edge_t edge, void *data);
+XBT_PUBLIC xbt_graph_t xbt_graph_new_graph(unsigned short int directed, void* data);
+XBT_PUBLIC xbt_node_t xbt_graph_new_node(xbt_graph_t g, void* data);
+XBT_PUBLIC xbt_edge_t xbt_graph_new_edge(xbt_graph_t g, xbt_node_t src, xbt_node_t dst, void* data);
+XBT_PUBLIC void* xbt_graph_node_get_data(xbt_node_t node);
+XBT_PUBLIC void xbt_graph_node_set_data(xbt_node_t node, void* data);
+XBT_PUBLIC void* xbt_graph_edge_get_data(xbt_edge_t edge);
+XBT_PUBLIC void xbt_graph_edge_set_data(xbt_edge_t edge, void* data);
 
-XBT_PUBLIC(xbt_edge_t) xbt_graph_get_edge(xbt_graph_t g, xbt_node_t src, xbt_node_t dst);
+XBT_PUBLIC xbt_edge_t xbt_graph_get_edge(xbt_graph_t g, xbt_node_t src, xbt_node_t dst);
 
-XBT_PUBLIC(void) xbt_graph_free_graph(xbt_graph_t g,
-    void_f_pvoid_t node_free_function, void_f_pvoid_t edge_free_function, void_f_pvoid_t graph_free_function);
+XBT_PUBLIC void xbt_graph_free_graph(xbt_graph_t g, void_f_pvoid_t node_free_function,
+                                     void_f_pvoid_t edge_free_function, void_f_pvoid_t graph_free_function);
 
-XBT_PUBLIC(xbt_dynar_t) xbt_graph_get_nodes(xbt_graph_t g);
-XBT_PUBLIC(xbt_dynar_t) xbt_graph_get_edges(xbt_graph_t g);
-XBT_PUBLIC(xbt_dynar_t) xbt_graph_node_get_outedges(xbt_node_t n);
-XBT_PUBLIC(xbt_node_t) xbt_graph_edge_get_source(xbt_edge_t e);
-XBT_PUBLIC(xbt_node_t) xbt_graph_edge_get_target(xbt_edge_t e);
+XBT_PUBLIC xbt_dynar_t xbt_graph_get_nodes(xbt_graph_t g);
+XBT_PUBLIC xbt_dynar_t xbt_graph_get_edges(xbt_graph_t g);
+XBT_PUBLIC xbt_dynar_t xbt_graph_node_get_outedges(xbt_node_t n);
+XBT_PUBLIC xbt_node_t xbt_graph_edge_get_source(xbt_edge_t e);
+XBT_PUBLIC xbt_node_t xbt_graph_edge_get_target(xbt_edge_t e);
 
 SG_END_DECL()
 #endif /* XBT_GRAPH_H */
index 7819e7e..ebaa88f 100644 (file)
@@ -112,8 +112,7 @@ typedef enum {
     }                                                                                                                  \
   }                                                                                                                    \
   SG_END_DECL()                                                                                                        \
-  XBT_EXPORT_NO_IMPORT(s_xbt_log_category_t)                                                                           \
-  _XBT_LOGV(catName) = {                                                                                               \
+  XBT_EXPORT_NO_IMPORT s_xbt_log_category_t _XBT_LOGV(catName) = {                                                     \
       &_XBT_LOGV(parent),                                                                                              \
       NULL /* firstChild */,                                                                                           \
       NULL /* nextSibling */,                                                                                          \
@@ -218,7 +217,7 @@ typedef enum {
 
 /* Functions you may call */
 
-XBT_PUBLIC(void) xbt_log_control_set(const char *cs);
+XBT_PUBLIC void xbt_log_control_set(const char* cs);
 
 /* Forward declarations */
 typedef struct xbt_log_appender_s  s_xbt_log_appender_t;
@@ -264,7 +263,7 @@ struct xbt_log_event_s {
  *
  * Programatically alters a category's threshold priority (don't use).
  */
-XBT_PUBLIC(void) xbt_log_threshold_set(xbt_log_category_t cat, e_xbt_log_priority_t thresholdPriority);
+XBT_PUBLIC void xbt_log_threshold_set(xbt_log_category_t cat, e_xbt_log_priority_t thresholdPriority);
 
 /**
  * \ingroup XBT_log_implem
@@ -273,7 +272,7 @@ XBT_PUBLIC(void) xbt_log_threshold_set(xbt_log_category_t cat, e_xbt_log_priorit
  *
  * Programatically sets the category's appender. (the preferred interface is through xbt_log_control_set())
  */
-XBT_PUBLIC(void) xbt_log_appender_set(xbt_log_category_t cat, xbt_log_appender_t app);
+XBT_PUBLIC void xbt_log_appender_set(xbt_log_category_t cat, xbt_log_appender_t app);
 /**
  * \ingroup XBT_log_implem
  * \param cat the category (not only its name, but the variable)
@@ -281,7 +280,7 @@ XBT_PUBLIC(void) xbt_log_appender_set(xbt_log_category_t cat, xbt_log_appender_t
  *
  * Programatically sets the category's layout. (the preferred interface is through xbt_log_control_set())
  */
-XBT_PUBLIC(void) xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay);
+XBT_PUBLIC void xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay);
 
 /**
  * \ingroup XBT_log_implem
@@ -291,26 +290,26 @@ XBT_PUBLIC(void) xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay
  * Programatically sets whether the logging actions must be passed to the parent category.
  * (the preferred interface is through xbt_log_control_set())
  */
-XBT_PUBLIC(void) xbt_log_additivity_set(xbt_log_category_t cat, int additivity);
+XBT_PUBLIC void xbt_log_additivity_set(xbt_log_category_t cat, int additivity);
 
 /** @brief create a new simple layout
  *
  * This layout is not as flexible as the pattern one
  */
-XBT_PUBLIC(xbt_log_layout_t) xbt_log_layout_simple_new(char *arg);
-XBT_PUBLIC(xbt_log_layout_t) xbt_log_layout_format_new(char *arg);
-XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender_file_new(char *arg);
-XBT_PUBLIC(xbt_log_appender_t) xbt_log_appender2_file_new(char *arg,int roll);
+XBT_PUBLIC xbt_log_layout_t xbt_log_layout_simple_new(char* arg);
+XBT_PUBLIC xbt_log_layout_t xbt_log_layout_format_new(char* arg);
+XBT_PUBLIC xbt_log_appender_t xbt_log_appender_file_new(char* arg);
+XBT_PUBLIC xbt_log_appender_t xbt_log_appender2_file_new(char* arg, int roll);
 
 /* ********************************** */
 /* Functions that you shouldn't call  */
 /* ********************************** */
-XBT_PUBLIC(void) xbt_log_init(int *argc, char **argv);
-XBT_PUBLIC(void) _xbt_log_event_log(xbt_log_event_t ev, const char *fmt, ...) XBT_ATTRIB_PRINTF(2, 3);
-XBT_PUBLIC(int) _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority);
+XBT_PUBLIC void xbt_log_init(int* argc, char** argv);
+XBT_PUBLIC void _xbt_log_event_log(xbt_log_event_t ev, const char* fmt, ...) XBT_ATTRIB_PRINTF(2, 3);
+XBT_PUBLIC int _xbt_log_cat_init(xbt_log_category_t category, e_xbt_log_priority_t priority);
 
 #ifdef DLL_EXPORT
-XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
+XBT_PUBLIC_DATA s_xbt_log_category_t _XBT_LOGV(XBT_LOG_ROOT_CAT);
 #else
 // If we `dllexport` the root log category, MinGW does not want us to take its address with the error:
 // > initializer element is not constant
index 6dbf711..4b4826c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016. The SimGrid Team. All rights reserved.*/
+/* Copyright (c) 2016, 2018. 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. */
@@ -16,11 +16,8 @@ namespace xbt {
  *
  *  @ingroup XBT_ex
  */
-XBT_PUBLIC(void) logException(
-  e_xbt_log_priority_t priority,
-  const char* context, std::exception const& exception);
-
-XBT_PUBLIC(void) installExceptionHandler();
+XBT_PUBLIC void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception);
 
+XBT_PUBLIC void installExceptionHandler();
 }
 }
index d0b0f36..d6107d4 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt/mallocator.h -- api to recycle allocated objects                     */
 
-/* Copyright (c) 2006-2007, 2009-2010, 2012-2014. The SimGrid Team.
+/* Copyright (c) 2006-2007, 2009-2010, 2012-2014, 2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -33,9 +33,9 @@ SG_BEGIN_DECL()
  */
 /** \brief Mallocator data type (opaque structure) */
 typedef struct s_xbt_mallocator *xbt_mallocator_t;
-XBT_PUBLIC(xbt_mallocator_t) xbt_mallocator_new(int size, pvoid_f_void_t new_f, void_f_pvoid_t free_f,
-                                                void_f_pvoid_t reset_f);
-XBT_PUBLIC(void) xbt_mallocator_free(xbt_mallocator_t mallocator);
+XBT_PUBLIC xbt_mallocator_t xbt_mallocator_new(int size, pvoid_f_void_t new_f, void_f_pvoid_t free_f,
+                                               void_f_pvoid_t reset_f);
+XBT_PUBLIC void xbt_mallocator_free(xbt_mallocator_t mallocator);
 /** @} */
 
 /* object handling */
@@ -44,10 +44,10 @@ XBT_PUBLIC(void) xbt_mallocator_free(xbt_mallocator_t mallocator);
  *
  *  @{
  */
-XBT_PUBLIC(void *) xbt_mallocator_get(xbt_mallocator_t mallocator);
-XBT_PUBLIC(void) xbt_mallocator_release(xbt_mallocator_t mallocator, void *object);
+XBT_PUBLIC void* xbt_mallocator_get(xbt_mallocator_t mallocator);
+XBT_PUBLIC void xbt_mallocator_release(xbt_mallocator_t mallocator, void* object);
 
-XBT_PUBLIC(void) xbt_mallocator_initialization_is_done(int protect);
+XBT_PUBLIC void xbt_mallocator_initialization_is_done(int protect);
 /** @} */
 
 SG_END_DECL()
index dc19d77..0aea069 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt.h - Public interface to the xbt (simgrid's toolbox)                     */
 
-/* Copyright (c) 2004-2015. The SimGrid Team.
+/* Copyright (c) 2004-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
 SG_BEGIN_DECL()
 
 /** Cache the size of a memory page for the current system. */
-XBT_PUBLIC_DATA(int) xbt_pagesize;
+XBT_PUBLIC_DATA int xbt_pagesize;
 
 /** Cache the number of bits of addresses inside a given page, log2(xbt_pagesize). */
-XBT_PUBLIC_DATA(int) xbt_pagebits;
+XBT_PUBLIC_DATA int xbt_pagebits;
 
 /** Helps ensuring that header version (SIMGRID_VERSION_MAJOR and friends) and dynamic library version do match. */
-XBT_PUBLIC(void) sg_version_check(int lib_version_major,int lib_version_minor,int lib_version_patch);
+XBT_PUBLIC void sg_version_check(int lib_version_major, int lib_version_minor, int lib_version_patch);
 
 /** Contains all the parameters we got from the command line */
-XBT_PUBLIC_DATA(xbt_dynar_t) sg_cmdline;
+XBT_PUBLIC_DATA xbt_dynar_t sg_cmdline;
 
 /* snprintf related functions */
 /** @addtogroup XBT_str
@@ -37,12 +37,12 @@ XBT_PUBLIC_DATA(xbt_dynar_t) sg_cmdline;
  *
  * Similar to vasprintf(), but returns a pointer to the newly created string (or aborts on error).
  */
-XBT_PUBLIC(char *) bvprintf(const char *fmt, va_list ap);
+XBT_PUBLIC char* bvprintf(const char* fmt, va_list ap);
 /** @brief print to allocated string
  *
  * Similar to asprintf(), but returns a pointer to the newly created string (or aborts on error).
  */
-XBT_PUBLIC(char *) bprintf(const char *fmt, ...) XBT_ATTRIB_PRINTF(1, 2);
+XBT_PUBLIC char* bprintf(const char* fmt, ...) XBT_ATTRIB_PRINTF(1, 2);
 /** @} */
 
 SG_END_DECL()
index a8b49c4..eff59a0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -31,29 +31,29 @@ typedef struct mdesc s_xbt_mheap_t;
 typedef struct mdesc *xbt_mheap_t;
 
 /* Allocate SIZE bytes of memory (and memset it to 0).  */
-XBT_PUBLIC( void ) *mmalloc(xbt_mheap_t md, size_t size);
+XBT_PUBLIC void* mmalloc(xbt_mheap_t md, size_t size);
 
 /* Allocate SIZE bytes of memory (and don't mess with it) */
 void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size);
 
 /* Re-allocate the previously allocated block in void*, making the new block SIZE bytes long.  */
-XBT_PUBLIC( void ) *mrealloc(xbt_mheap_t md, void *ptr, size_t size);
+XBT_PUBLIC void* mrealloc(xbt_mheap_t md, void* ptr, size_t size);
 
 /* Free a block allocated by `mmalloc', `mrealloc' or `mcalloc'.  */
-XBT_PUBLIC( void ) mfree(xbt_mheap_t md, void *ptr);
+XBT_PUBLIC void mfree(xbt_mheap_t md, void* ptr);
 
-XBT_PUBLIC( xbt_mheap_t ) xbt_mheap_new(int fd, void *baseaddr);
+XBT_PUBLIC xbt_mheap_t xbt_mheap_new(int fd, void* baseaddr);
 
 #define XBT_MHEAP_OPTION_MEMSET 1
 
-XBT_PUBLIC( xbt_mheap_t ) xbt_mheap_new_options(int fd, void *baseaddr, int options);
+XBT_PUBLIC xbt_mheap_t xbt_mheap_new_options(int fd, void* baseaddr, int options);
 
-XBT_PUBLIC( void ) xbt_mheap_destroy_no_free(xbt_mheap_t md);
+XBT_PUBLIC void xbt_mheap_destroy_no_free(xbt_mheap_t md);
 
-XBT_PUBLIC( void ) *xbt_mheap_destroy(xbt_mheap_t md);
+XBT_PUBLIC void* xbt_mheap_destroy(xbt_mheap_t md);
 
 /* return the heap used when NULL is passed as first argument to any mm* function */
-XBT_PUBLIC( xbt_mheap_t ) mmalloc_get_default_md(void);
+XBT_PUBLIC xbt_mheap_t mmalloc_get_default_md(void);
 
 /* To change the heap used when using the legacy version malloc/free/realloc and such */
 xbt_mheap_t mmalloc_set_current_heap(xbt_mheap_t new_heap);
index ba5b03f..353baad 100644 (file)
@@ -1,6 +1,6 @@
 /* module - modularize the code                                             */
 
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -12,7 +12,7 @@
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) xbt_init(int *argc, char **argv);
+XBT_PUBLIC void xbt_init(int* argc, char** argv);
 
 SG_END_DECL()
 
index a969fbc..dcbfa21 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt/replay_reader.h -- Tools to parse a replay file                */
 
-/* Copyright (c) 2010, 2012-2015, 2017. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2015, 2017-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -21,8 +21,8 @@ namespace xbt {
 typedef std::vector<std::string> ReplayAction;
 static std::unordered_map<std::string, std::queue<ReplayAction*>*> action_queues;
 
-XBT_PUBLIC_DATA(std::ifstream*) action_fs;
-XBT_PUBLIC(int) replay_runner(int argc, char* argv[]);
+XBT_PUBLIC_DATA std::ifstream* action_fs;
+XBT_PUBLIC int replay_runner(int argc, char* argv[]);
 }
 }
 #endif
@@ -30,8 +30,8 @@ XBT_PUBLIC(int) replay_runner(int argc, char* argv[]);
 SG_BEGIN_DECL()
 
 typedef void (*action_fun)(const char* const* args);
-XBT_PUBLIC(void) xbt_replay_action_register(const char* action_name, action_fun function);
-XBT_PUBLIC(action_fun) xbt_replay_action_get(const char* action_name);
+XBT_PUBLIC void xbt_replay_action_register(const char* action_name, action_fun function);
+XBT_PUBLIC action_fun xbt_replay_action_get(const char* action_name);
 
 SG_END_DECL()
 
index 8068459..31b2fa1 100644 (file)
@@ -1,6 +1,6 @@
 /* str.h - XBT string related functions.                                    */
 
-/* Copyright (c) 2007-2017. The SimGrid Team.
+/* Copyright (c) 2007-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -26,14 +26,14 @@ SG_BEGIN_DECL()
  * @{
  */
 
-XBT_PUBLIC(xbt_dynar_t) xbt_str_split(const char *s, const char *sep);
-XBT_PUBLIC(xbt_dynar_t) xbt_str_split_quoted(const char *s);
-XBT_PUBLIC(xbt_dynar_t) xbt_str_split_quoted_in_place(char *s);
+XBT_PUBLIC xbt_dynar_t xbt_str_split(const char* s, const char* sep);
+XBT_PUBLIC xbt_dynar_t xbt_str_split_quoted(const char* s);
+XBT_PUBLIC xbt_dynar_t xbt_str_split_quoted_in_place(char* s);
 
-XBT_PUBLIC(char *) xbt_str_join_array(const char *const *strs, const char *sep);
+XBT_PUBLIC char* xbt_str_join_array(const char* const* strs, const char* sep);
 
-XBT_PUBLIC(long int) xbt_str_parse_int(const char* str, const char* error_msg);
-XBT_PUBLIC(double) xbt_str_parse_double(const char* str, const char* error_msg);
+XBT_PUBLIC long int xbt_str_parse_int(const char* str, const char* error_msg);
+XBT_PUBLIC double xbt_str_parse_double(const char* str, const char* error_msg);
 
 #define XBT_DJB2_HASH_FUNCTION
 //#define XBT_FNV_HASH_FUNCTION
@@ -41,7 +41,7 @@ XBT_PUBLIC(double) xbt_str_parse_double(const char* str, const char* error_msg);
 /**
  * @brief Returns the hash code of a string.
  */
-static inline unsigned int xbt_str_hash_ext(const char *str, int str_len)
+static inline unsigned int xbt_str_hash_ext(const charstr, int str_len)
 {
 #ifdef XBT_DJB2_HASH_FUNCTION
   /* fast implementation of djb2 algorithm */
index 0cc1c48..bb237f0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2018. 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. */
@@ -54,7 +54,7 @@ struct string_data {
  *  * the [C++11-conforming implementation](https://gcc.gnu.org/gcc-5/changes.html)
  *    does not use refcouting/COW but has a small string optimization.
  */
-XBT_PUBLIC_CLASS string : private string_data {
+class XBT_PUBLIC string : private string_data {
   static char NUL;
 
 public:
@@ -300,13 +300,13 @@ typedef std::string string;
  *
  * @ingroup XBT_str
 */
-XBT_PUBLIC(std::string) string_printf(const char* fmt, ...);
+XBT_PUBLIC std::string string_printf(const char* fmt, ...);
 
 /** Create a C++ string from a C-style format
  *
  * @ingroup XBT_str
 */
-XBT_PUBLIC(std::string) string_vprintf(const char* fmt, va_list ap);
+XBT_PUBLIC std::string string_vprintf(const char* fmt, va_list ap);
 }
 }
 
index e5f7d06..3a990f1 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt/synchro.h -- Simulated synchronization                               */
 
-/* Copyright (c) 2009-2016. The SimGrid Team.                               */
+/* Copyright (c) 2009-2018. The SimGrid Team.                               */
 
 /* 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. */
@@ -29,10 +29,10 @@ SG_BEGIN_DECL()
 typedef struct s_smx_mutex_* xbt_mutex_t;
 
 /** @brief Creates a new mutex variable */
-XBT_PUBLIC(xbt_mutex_t) xbt_mutex_init(void);
+XBT_PUBLIC xbt_mutex_t xbt_mutex_init(void);
 
 /** @brief Blocks onto the given mutex variable */
-XBT_PUBLIC(void) xbt_mutex_acquire(xbt_mutex_t mutex);
+XBT_PUBLIC void xbt_mutex_acquire(xbt_mutex_t mutex);
 
 /** @brief Tries to block onto the given mutex variable
  * Tries to lock a mutex, return 1 if the mutex is unlocked, else 0.
@@ -40,13 +40,13 @@ XBT_PUBLIC(void) xbt_mutex_acquire(xbt_mutex_t mutex);
  * \param mutex The mutex
  * \return 1 - mutex free, 0 - mutex used
  */
-XBT_PUBLIC(int) xbt_mutex_try_acquire(xbt_mutex_t mutex);
+XBT_PUBLIC int xbt_mutex_try_acquire(xbt_mutex_t mutex);
 
 /** @brief Releases the given mutex variable */
-XBT_PUBLIC(void) xbt_mutex_release(xbt_mutex_t mutex);
+XBT_PUBLIC void xbt_mutex_release(xbt_mutex_t mutex);
 
 /** @brief Destroyes the given mutex variable */
-XBT_PUBLIC(void) xbt_mutex_destroy(xbt_mutex_t mutex);
+XBT_PUBLIC void xbt_mutex_destroy(xbt_mutex_t mutex);
 
 /** @brief Thread condition data type (opaque object)
  *  @hideinitializer
@@ -54,19 +54,19 @@ XBT_PUBLIC(void) xbt_mutex_destroy(xbt_mutex_t mutex);
 typedef struct s_smx_cond_* xbt_cond_t;
 
 /** @brief Creates a condition variable */
-XBT_PUBLIC(xbt_cond_t) xbt_cond_init(void);
+XBT_PUBLIC xbt_cond_t xbt_cond_init(void);
 
 /** @brief Blocks onto the given condition variable */
-XBT_PUBLIC(void) xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex);
+XBT_PUBLIC void xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex);
 /** @brief Blocks onto the given condition variable, but only for the given amount of time.
  *  @return 0 on success, 1 on timeout */
-XBT_PUBLIC(int) xbt_cond_timedwait(xbt_cond_t cond, xbt_mutex_t mutex, double delay);
+XBT_PUBLIC int xbt_cond_timedwait(xbt_cond_t cond, xbt_mutex_t mutex, double delay);
 /** @brief Signals the given mutex variable */
-XBT_PUBLIC(void) xbt_cond_signal(xbt_cond_t cond);
+XBT_PUBLIC void xbt_cond_signal(xbt_cond_t cond);
 /** @brief Broadcasts the given mutex variable */
-XBT_PUBLIC(void) xbt_cond_broadcast(xbt_cond_t cond);
+XBT_PUBLIC void xbt_cond_broadcast(xbt_cond_t cond);
 /** @brief Destroys the given mutex variable */
-XBT_PUBLIC(void) xbt_cond_destroy(xbt_cond_t cond);
+XBT_PUBLIC void xbt_cond_destroy(xbt_cond_t cond);
 
 /** @} */
 
index 3cbeb65..d0b94e7 100644 (file)
@@ -2,7 +2,7 @@
 /*  no system header should be loaded out of this file so that we have only */
 /*  one file to check when porting to another OS                            */
 
-/* Copyright (c) 2004-2017. The SimGrid Team.
+/* Copyright (c) 2004-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@ SG_BEGIN_DECL()
  * @{
  */
 /** @brief Kill the program in silence */
-XBT_ATTRIB_NORETURN XBT_PUBLIC(void) xbt_abort(void);
+XBT_ATTRIB_NORETURN XBT_PUBLIC void xbt_abort(void);
 
 /**
  * @brief Kill the program with an error message
@@ -71,7 +71,7 @@ static XBT_ALWAYS_INLINE char *xbt_strdup(const char *s) {
   return res;
 }
 
-XBT_PUBLIC(void) xbt_backtrace_display_current();
+XBT_PUBLIC void xbt_backtrace_display_current();
 
 /** @brief Like malloc, but xbt_die() on error
     @hideinitializer */
@@ -114,9 +114,9 @@ static XBT_ALWAYS_INLINE void *xbt_realloc(void *p, size_t s) {
 #define xbt_free(p) free(p) /*nothing specific to do here. A poor valgrind replacement? */
 
 /** @brief like free, but you can be sure that it is a function  */
-XBT_PUBLIC(void) xbt_free_f(void *p);
+XBT_PUBLIC void xbt_free_f(void* p);
 /** @brief should be given a pointer to pointer, and frees the second one */
-XBT_PUBLIC(void) xbt_free_ref(void *d);
+XBT_PUBLIC void xbt_free_ref(void* d);
 
 SG_END_DECL()
 
index bb4bad2..1386a56 100644 (file)
@@ -1,6 +1,6 @@
 /* virtu - virtualization layer for the logging to know about the actors    */
 
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(const char*) xbt_procname(void);
+XBT_PUBLIC const char* xbt_procname(void);
 
-XBT_PUBLIC(int) xbt_getpid(void);
+XBT_PUBLIC int xbt_getpid(void);
 
 /* Get the name of the UNIX process englobing the world */
-XBT_PUBLIC_DATA(char*) xbt_binary_name;
+XBT_PUBLIC_DATA char* xbt_binary_name;
 
 /** Contains all the parameters we got from the command line (including argv[0]) */
-XBT_PUBLIC_DATA(xbt_dynar_t) xbt_cmdline;
+XBT_PUBLIC_DATA xbt_dynar_t xbt_cmdline;
 
 SG_END_DECL()
 #endif /* XBT_VIRTU_H */
index 23b8fc8..f0e976b 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt/xbt_os_thread.h -- Thread portability layer                          */
 
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -24,50 +24,51 @@ typedef pthread_key_t xbt_os_thread_key_t;
  *  @{
  */
 
-XBT_PUBLIC(int) xbt_os_get_numcores(void);
+XBT_PUBLIC int xbt_os_get_numcores(void);
 
-  /** \brief Thread data type (opaque structure) */
+/** \brief Thread data type (opaque structure) */
 typedef struct xbt_os_thread_ *xbt_os_thread_t;
-XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_create(const char *name, pvoid_f_pvoid_t start_routine, void *param, void *data);
-XBT_PUBLIC(void) xbt_os_thread_exit(int *retcode);
+XBT_PUBLIC xbt_os_thread_t xbt_os_thread_create(const char* name, pvoid_f_pvoid_t start_routine, void* param,
+                                                void* data);
+XBT_PUBLIC void xbt_os_thread_exit(int* retcode);
 
-XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_self(void);
-XBT_PUBLIC(const char *) xbt_os_thread_self_name(void);
-XBT_PUBLIC(void) xbt_os_thread_set_extra_data(void *data);
-XBT_PUBLIC(void *) xbt_os_thread_get_extra_data(void);
-XBT_PUBLIC(void) xbt_os_thread_key_create(xbt_os_thread_key_t* key);
-XBT_PUBLIC(void) xbt_os_thread_key_destroy(xbt_os_thread_key_t key);
-XBT_PUBLIC(void) xbt_os_thread_set_specific(xbt_os_thread_key_t key, void* value);
-XBT_PUBLIC(void*) xbt_os_thread_get_specific(xbt_os_thread_key_t key);
-  /* xbt_os_thread_join frees the joined thread (ie the XBT wrapper around it, the OS frees the rest) */
-XBT_PUBLIC(void) xbt_os_thread_join(xbt_os_thread_t thread, void **thread_return);
-XBT_PUBLIC(void) xbt_os_thread_yield(void);
-XBT_PUBLIC(void) xbt_os_thread_setstacksize(int stack_size);
-XBT_PUBLIC(void) xbt_os_thread_setguardsize(int guard_size);
-XBT_PUBLIC(int) xbt_os_thread_bind(xbt_os_thread_t thread, int core);
-XBT_PUBLIC(int) xbt_os_thread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
+XBT_PUBLIC xbt_os_thread_t xbt_os_thread_self(void);
+XBT_PUBLIC const char* xbt_os_thread_self_name(void);
+XBT_PUBLIC void xbt_os_thread_set_extra_data(void* data);
+XBT_PUBLIC void* xbt_os_thread_get_extra_data(void);
+XBT_PUBLIC void xbt_os_thread_key_create(xbt_os_thread_key_t* key);
+XBT_PUBLIC void xbt_os_thread_key_destroy(xbt_os_thread_key_t key);
+XBT_PUBLIC void xbt_os_thread_set_specific(xbt_os_thread_key_t key, void* value);
+XBT_PUBLIC void* xbt_os_thread_get_specific(xbt_os_thread_key_t key);
+/* xbt_os_thread_join frees the joined thread (ie the XBT wrapper around it, the OS frees the rest) */
+XBT_PUBLIC void xbt_os_thread_join(xbt_os_thread_t thread, void** thread_return);
+XBT_PUBLIC void xbt_os_thread_yield(void);
+XBT_PUBLIC void xbt_os_thread_setstacksize(int stack_size);
+XBT_PUBLIC void xbt_os_thread_setguardsize(int guard_size);
+XBT_PUBLIC int xbt_os_thread_bind(xbt_os_thread_t thread, int core);
+XBT_PUBLIC int xbt_os_thread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
 
-  /** \brief Thread mutex data type (opaque structure) */
+/** \brief Thread mutex data type (opaque structure) */
 typedef struct xbt_os_mutex_ *xbt_os_mutex_t;
-XBT_PUBLIC(xbt_os_mutex_t) xbt_os_mutex_init(void);
-XBT_PUBLIC(void) xbt_os_mutex_acquire(xbt_os_mutex_t mutex);
-XBT_PUBLIC(void) xbt_os_mutex_release(xbt_os_mutex_t mutex);
-XBT_PUBLIC(void) xbt_os_mutex_destroy(xbt_os_mutex_t mutex);
+XBT_PUBLIC xbt_os_mutex_t xbt_os_mutex_init(void);
+XBT_PUBLIC void xbt_os_mutex_acquire(xbt_os_mutex_t mutex);
+XBT_PUBLIC void xbt_os_mutex_release(xbt_os_mutex_t mutex);
+XBT_PUBLIC void xbt_os_mutex_destroy(xbt_os_mutex_t mutex);
 
 /** \brief Thread condition data type (opaque structure) */
 typedef struct xbt_os_cond_ *xbt_os_cond_t;
-XBT_PUBLIC(xbt_os_cond_t) xbt_os_cond_init(void);
-XBT_PUBLIC(void) xbt_os_cond_wait(xbt_os_cond_t cond, xbt_os_mutex_t mutex);
-XBT_PUBLIC(void) xbt_os_cond_signal(xbt_os_cond_t cond);
-XBT_PUBLIC(void) xbt_os_cond_broadcast(xbt_os_cond_t cond);
-XBT_PUBLIC(void) xbt_os_cond_destroy(xbt_os_cond_t cond);
+XBT_PUBLIC xbt_os_cond_t xbt_os_cond_init(void);
+XBT_PUBLIC void xbt_os_cond_wait(xbt_os_cond_t cond, xbt_os_mutex_t mutex);
+XBT_PUBLIC void xbt_os_cond_signal(xbt_os_cond_t cond);
+XBT_PUBLIC void xbt_os_cond_broadcast(xbt_os_cond_t cond);
+XBT_PUBLIC void xbt_os_cond_destroy(xbt_os_cond_t cond);
 
 /** \brief Semaphore data type (opaque structure) */
 typedef struct xbt_os_sem_ *xbt_os_sem_t;
-XBT_PUBLIC(xbt_os_sem_t) xbt_os_sem_init(unsigned int value);
-XBT_PUBLIC(void) xbt_os_sem_acquire(xbt_os_sem_t sem);
-XBT_PUBLIC(void) xbt_os_sem_release(xbt_os_sem_t sem);
-XBT_PUBLIC(void) xbt_os_sem_destroy(xbt_os_sem_t sem);
+XBT_PUBLIC xbt_os_sem_t xbt_os_sem_init(unsigned int value);
+XBT_PUBLIC void xbt_os_sem_acquire(xbt_os_sem_t sem);
+XBT_PUBLIC void xbt_os_sem_release(xbt_os_sem_t sem);
+XBT_PUBLIC void xbt_os_sem_destroy(xbt_os_sem_t sem);
 
 /** @} */
 
index e7b2c24..074218b 100644 (file)
@@ -1,6 +1,6 @@
 /*  xbt/xbt_os_timer.h -- system dependency on time functions               */
 
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -17,27 +17,27 @@ SG_BEGIN_DECL()
  *
  * gives  the  number  of  seconds since the Epoch (00:00:00 UTC, January 1, 1970).
  */
-XBT_PUBLIC(double) xbt_os_time(void);
-XBT_PUBLIC(void) xbt_os_sleep(double sec);
+XBT_PUBLIC double xbt_os_time(void);
+XBT_PUBLIC void xbt_os_sleep(double sec);
 
 typedef struct s_xbt_os_timer *xbt_os_timer_t;
 
-XBT_PUBLIC(xbt_os_timer_t) xbt_os_timer_new(void);
-XBT_PUBLIC(void) xbt_os_timer_free(xbt_os_timer_t timer);
-XBT_PUBLIC(double) xbt_os_timer_elapsed(xbt_os_timer_t timer);
-XBT_PUBLIC(size_t) xbt_os_timer_size(void);
+XBT_PUBLIC xbt_os_timer_t xbt_os_timer_new(void);
+XBT_PUBLIC void xbt_os_timer_free(xbt_os_timer_t timer);
+XBT_PUBLIC double xbt_os_timer_elapsed(xbt_os_timer_t timer);
+XBT_PUBLIC size_t xbt_os_timer_size(void);
 
-XBT_PUBLIC(void) xbt_os_walltimer_start(xbt_os_timer_t timer);
-XBT_PUBLIC(void) xbt_os_walltimer_resume(xbt_os_timer_t timer);
-XBT_PUBLIC(void) xbt_os_walltimer_stop(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_walltimer_start(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_walltimer_resume(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_walltimer_stop(xbt_os_timer_t timer);
 
-XBT_PUBLIC(void) xbt_os_cputimer_start(xbt_os_timer_t timer);
-XBT_PUBLIC(void) xbt_os_cputimer_resume(xbt_os_timer_t timer);
-XBT_PUBLIC(void) xbt_os_cputimer_stop(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_cputimer_start(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_cputimer_resume(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_cputimer_stop(xbt_os_timer_t timer);
 
-XBT_PUBLIC(void) xbt_os_threadtimer_start(xbt_os_timer_t timer);
-XBT_PUBLIC(void) xbt_os_threadtimer_resume(xbt_os_timer_t timer);
-XBT_PUBLIC(void) xbt_os_threadtimer_stop(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_threadtimer_start(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_threadtimer_resume(xbt_os_timer_t timer);
+XBT_PUBLIC void xbt_os_threadtimer_stop(xbt_os_timer_t timer);
 
 SG_END_DECL()
 
index 10645cf..1e13c93 100644 (file)
@@ -103,9 +103,9 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_daemonize(JNIEnv* env, jobje
   MSG_process_daemonize(process);
 }
 
-JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll(JNIEnv * env, jclass cls, jint jresetPID)
+JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll(JNIEnv* env, jclass cls)
 {
-  return (jint) MSG_process_killall((int) jresetPID);
+  return (jint)MSG_process_killall();
 }
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID(JNIEnv * env, jclass cls, jint pid)
index 0d5cc44..55b78b7 100644 (file)
@@ -48,7 +48,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_nativeInit(JNIEnv *env, jcla
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_create(JNIEnv* env, jobject jprocess_arg, jobject jhostname);
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_daemonize(JNIEnv* env, jobject jprocess);
-JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll(JNIEnv* env, jclass cls, jint jresetPID);
+JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll(JNIEnv* env, jclass cls);
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID(JNIEnv* env, jclass cls, jint pid);
 JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_nativeGetPID(JNIEnv* env, jobject jprocess);
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getProperty(JNIEnv* env, jobject jprocess, jobject jname);
index 6c06550..4c27475 100644 (file)
@@ -148,14 +148,10 @@ public abstract class Process implements Runnable {
        /**
         * This method kills all running process of the simulation.
         *
-        * @param resetPID              Should we reset the PID numbers. A negative number means no reset
-        *                                              and a positive number will be used to set the PID of the next newly
-        *                                              created process.
-        *
         * @return                              The function returns the PID of the next created process.
         *                      
         */ 
-       public static native int killAll(int resetPID);
+       public static native int killAll();
 
        /** Simply kills the receiving process.
         *
index a3262e0..e31aea6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2018. 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. */
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(int) TRACE_start ();
-XBT_PUBLIC(int) TRACE_end ();
-XBT_PUBLIC(void) TRACE_global_init();
-XBT_PUBLIC(void) TRACE_help(int detailed);
+XBT_PUBLIC int TRACE_start();
+XBT_PUBLIC int TRACE_end();
+XBT_PUBLIC void TRACE_global_init();
+XBT_PUBLIC void TRACE_help(int detailed);
 
 SG_END_DECL()
 
index 49e0f09..3119413 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2018. 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. */
 SG_BEGIN_DECL()
 
 /********************************** Configuration of MC **************************************/
-extern XBT_PUBLIC(int) _sg_do_model_check;
+extern XBT_PUBLIC int _sg_do_model_check;
 extern XBT_PRIVATE int _sg_do_model_check_record;
 extern XBT_PRIVATE int _sg_mc_checkpoint;
-extern XBT_PUBLIC(int) _sg_mc_sparse_checkpoint;
-extern XBT_PUBLIC(int) _sg_mc_ksm;
+extern XBT_PUBLIC int _sg_mc_sparse_checkpoint;
+extern XBT_PUBLIC int _sg_mc_ksm;
 extern XBT_PRIVATE int _sg_mc_timeout;
 extern XBT_PRIVATE int _sg_mc_hash;
 extern XBT_PRIVATE int _sg_mc_max_depth;
-extern XBT_PUBLIC(int) _sg_mc_max_visited_states;
-extern XBT_PUBLIC(int) _sg_mc_comms_determinism;
-extern XBT_PUBLIC(int) _sg_mc_send_determinism;
+extern XBT_PUBLIC int _sg_mc_max_visited_states;
+extern XBT_PUBLIC int _sg_mc_comms_determinism;
+extern XBT_PUBLIC int _sg_mc_send_determinism;
 extern XBT_PRIVATE int _sg_mc_snapshot_fds;
 extern XBT_PRIVATE int _sg_mc_termination;
 
@@ -55,13 +55,13 @@ XBT_PRIVATE void _mc_cfg_cb_comms_determinism(const char *name);
 XBT_PRIVATE void _mc_cfg_cb_send_determinism(const char *name);
 XBT_PRIVATE void _mc_cfg_cb_termination(const char *name);
 
-XBT_PUBLIC(void) MC_run();
-XBT_PUBLIC(void) MC_process_clock_add(smx_actor_t, double);
-XBT_PUBLIC(double) MC_process_clock_get(smx_actor_t);
+XBT_PUBLIC void MC_run();
+XBT_PUBLIC void MC_process_clock_add(smx_actor_t, double);
+XBT_PUBLIC double MC_process_clock_get(smx_actor_t);
 XBT_PRIVATE void MC_automaton_load(const char *file);
 
 /********************************* Memory *************************************/
-XBT_PUBLIC(void) MC_memory_init();  /* Initialize the memory subsystem */
+XBT_PUBLIC void MC_memory_init(); /* Initialize the memory subsystem */
 
 SG_END_DECL()
 
index 304b7b6..a72e8ce 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2018. 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. */
 /** Config Globals */
 SG_BEGIN_DECL()
 
-XBT_PUBLIC_DATA(xbt_cfg_t) simgrid_config;
-XBT_PUBLIC_DATA(int) _sg_cfg_init_status;
-XBT_PUBLIC_DATA(int) _sg_cfg_exit_asap;
+XBT_PUBLIC_DATA xbt_cfg_t simgrid_config;
+XBT_PUBLIC_DATA int _sg_cfg_init_status;
+XBT_PUBLIC_DATA int _sg_cfg_exit_asap;
 
-XBT_PUBLIC(void) sg_config_init(int *argc, char **argv);
-XBT_PUBLIC(void) sg_config_finalize();
+XBT_PUBLIC void sg_config_init(int* argc, char** argv);
+XBT_PUBLIC void sg_config_finalize();
 
 SG_END_DECL()
 
index 84b8c16..d26ba8e 100644 (file)
@@ -58,8 +58,8 @@ struct surf_model_description {
 };
 typedef struct surf_model_description s_surf_model_description_t;
 
-XBT_PUBLIC(int) find_model_description(s_surf_model_description_t* table, std::string name);
-XBT_PUBLIC(void) model_help(const char* category, s_surf_model_description_t* table);
+XBT_PUBLIC int find_model_description(s_surf_model_description_t* table, std::string name);
+XBT_PUBLIC void model_help(const char* category, s_surf_model_description_t* table);
 
 /***************************/
 /* Generic model object */
@@ -73,7 +73,7 @@ XBT_PUBLIC(void) model_help(const char* category, s_surf_model_description_t* ta
  * @param model The model from which the action is extracted
  * @return An action in done state
  */
-XBT_PUBLIC(simgrid::kernel::resource::Action*)
+XBT_PUBLIC simgrid::kernel::resource::Action*
 surf_model_extract_done_action_set(simgrid::kernel::resource::Model* model);
 
 /**
@@ -82,7 +82,7 @@ surf_model_extract_done_action_set(simgrid::kernel::resource::Model* model);
  * @param model The model from which the action is extracted
  * @return An action in failed state
  */
-XBT_PUBLIC(simgrid::kernel::resource::Action*)
+XBT_PUBLIC simgrid::kernel::resource::Action*
 surf_model_extract_failed_action_set(simgrid::kernel::resource::Model* model);
 
 /**
@@ -91,7 +91,7 @@ surf_model_extract_failed_action_set(simgrid::kernel::resource::Model* model);
  * @param model The model
  * @return The size of the running action set
  */
-XBT_PUBLIC(int) surf_model_running_action_set_size(simgrid::kernel::resource::Model* model);
+XBT_PUBLIC int surf_model_running_action_set_size(simgrid::kernel::resource::Model* model);
 
 /**
  * @brief [brief description]
@@ -100,7 +100,7 @@ XBT_PUBLIC(int) surf_model_running_action_set_size(simgrid::kernel::resource::Mo
  * @param action The surf cpu action
  * @param bound [description]
  */
-XBT_PUBLIC(void) surf_cpu_action_set_bound(simgrid::kernel::resource::Action* action, double bound);
+XBT_PUBLIC void surf_cpu_action_set_bound(simgrid::kernel::resource::Action* action, double bound);
 
 /** @} */
 
@@ -111,12 +111,12 @@ XBT_PUBLIC(void) surf_cpu_action_set_bound(simgrid::kernel::resource::Action* ac
 /** \ingroup SURF_models
  *  \brief The CPU model object for the physical machine layer
  */
-XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model_pm;
+XBT_PUBLIC_DATA surf_cpu_model_t surf_cpu_model_pm;
 
 /** \ingroup SURF_models
  *  \brief The CPU model object for the virtual machine layer
  */
-XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model_vm;
+XBT_PUBLIC_DATA surf_cpu_model_t surf_cpu_model_vm;
 
 /** \ingroup SURF_models
  *  \brief Initializes the CPU model with the model Cas01
@@ -127,30 +127,30 @@ XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model_vm;
  *
  *  You shouldn't have to call it by yourself.
  */
-XBT_PUBLIC(void) surf_cpu_model_init_Cas01();
+XBT_PUBLIC void surf_cpu_model_init_Cas01();
 
 /** \ingroup SURF_models
  *  \brief Initializes the CPU model with trace integration [Deprecated]
  *
  *  You shouldn't have to call it by yourself.
  */
-XBT_PUBLIC(void) surf_cpu_model_init_ti();
+XBT_PUBLIC void surf_cpu_model_init_ti();
 
 /** \ingroup SURF_models
  *  \brief The list of all available optimization modes (both for cpu and networks).
  *  These optimization modes can be set using --cfg=cpu/optim:... and --cfg=network/optim:...
  */
-XBT_PUBLIC_DATA(s_surf_model_description_t) surf_optimization_mode_description[];
+XBT_PUBLIC_DATA s_surf_model_description_t surf_optimization_mode_description[];
 
 /** \ingroup SURF_plugins
  *  \brief The list of all available surf plugins
  */
-XBT_PUBLIC_DATA(s_surf_model_description_t) surf_plugin_description[];
+XBT_PUBLIC_DATA s_surf_model_description_t surf_plugin_description[];
 
 /** \ingroup SURF_models
  *  \brief The list of all available cpu model models
  */
-XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
+XBT_PUBLIC_DATA s_surf_model_description_t surf_cpu_model_description[];
 
 /** \ingroup SURF_models
  *  \brief The network model
@@ -158,7 +158,7 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
  *  When creating a new API on top on SURF, you shouldn't use the network model unless you know what you are doing.
  *  Only the host model should be accessed because depending on the platform model, the network model can be NULL.
  */
-XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
+XBT_PUBLIC_DATA surf_network_model_t surf_network_model;
 
 /** \ingroup SURF_models
  *  \brief Same as network model 'LagrangeVelho', only with different correction factors.
@@ -169,7 +169,7 @@ XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
  *
  *  \see surf_host_model_init_SMPI()
  */
-XBT_PUBLIC(void) surf_network_model_init_SMPI();
+XBT_PUBLIC void surf_network_model_init_SMPI();
 
 /** \ingroup SURF_models
  *  \brief Same as network model 'LagrangeVelho', only with different correction factors.
@@ -179,7 +179,7 @@ XBT_PUBLIC(void) surf_network_model_init_SMPI();
  *
  *  \see surf_host_model_init_IB()
  */
-XBT_PUBLIC(void) surf_network_model_init_IB();
+XBT_PUBLIC void surf_network_model_init_IB();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model 'LegrandVelho'
@@ -189,7 +189,7 @@ XBT_PUBLIC(void) surf_network_model_init_IB();
  *
  *  \see surf_host_model_init_LegrandVelho()
  */
-XBT_PUBLIC(void) surf_network_model_init_LegrandVelho();
+XBT_PUBLIC void surf_network_model_init_LegrandVelho();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model 'Constant'
@@ -200,7 +200,7 @@ XBT_PUBLIC(void) surf_network_model_init_LegrandVelho();
  *
  *  \see surf_host_model_init_compound()
  */
-XBT_PUBLIC(void) surf_network_model_init_Constant();
+XBT_PUBLIC void surf_network_model_init_Constant();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model CM02
@@ -208,7 +208,7 @@ XBT_PUBLIC(void) surf_network_model_init_Constant();
  *  You sould call this function by yourself only if you plan using surf_host_model_init_compound.
  *  See comments in the code for more information.
  */
-XBT_PUBLIC(void) surf_network_model_init_CM02();
+XBT_PUBLIC void surf_network_model_init_CM02();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model NS3
@@ -218,7 +218,7 @@ XBT_PUBLIC(void) surf_network_model_init_CM02();
  *
  *  \see surf_host_model_init_NS3()
  */
-XBT_PUBLIC(void) surf_network_model_init_NS3();
+XBT_PUBLIC void surf_network_model_init_NS3();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model Reno
@@ -231,7 +231,7 @@ XBT_PUBLIC(void) surf_network_model_init_NS3();
  *
  *  Call this function only if you plan using surf_host_model_init_compound.
  */
-XBT_PUBLIC(void) surf_network_model_init_Reno();
+XBT_PUBLIC void surf_network_model_init_Reno();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model Reno2
@@ -244,7 +244,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno();
  *
  *  Call this function only if you plan using surf_host_model_init_compound.
  */
-XBT_PUBLIC(void) surf_network_model_init_Reno2();
+XBT_PUBLIC void surf_network_model_init_Reno2();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model Vegas
@@ -257,25 +257,25 @@ XBT_PUBLIC(void) surf_network_model_init_Reno2();
  *
  *  Call this function only if you plan using surf_host_model_init_compound.
  */
-XBT_PUBLIC(void) surf_network_model_init_Vegas();
+XBT_PUBLIC void surf_network_model_init_Vegas();
 
 /** \ingroup SURF_models
  *  \brief The list of all available network model models
  */
-XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[];
+XBT_PUBLIC_DATA s_surf_model_description_t surf_network_model_description[];
 
 /** \ingroup SURF_models
  *  \brief The storage model
  */
-XBT_PUBLIC(void) surf_storage_model_init_default();
+XBT_PUBLIC void surf_storage_model_init_default();
 
 /** \ingroup SURF_models
  *  \brief The list of all available storage modes.
  *  This storage mode can be set using --cfg=storage/model:...
  */
-XBT_PUBLIC_DATA(s_surf_model_description_t) surf_storage_model_description[];
+XBT_PUBLIC_DATA s_surf_model_description_t surf_storage_model_description[];
 
-XBT_PUBLIC_DATA(surf_storage_model_t) surf_storage_model;
+XBT_PUBLIC_DATA surf_storage_model_t surf_storage_model;
 
 /** \ingroup SURF_models
  *  \brief The host model
@@ -283,14 +283,14 @@ XBT_PUBLIC_DATA(surf_storage_model_t) surf_storage_model;
  *  Note that when you create an API on top of SURF, the host model should be the only one you use
  *  because depending on the platform model, the network model and the CPU model may not exist.
  */
-XBT_PUBLIC_DATA(surf_host_model_t) surf_host_model;
+XBT_PUBLIC_DATA surf_host_model_t surf_host_model;
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with a compound host model
  *
  *  This function should be called after a cpu_model and a network_model have been set up.
  */
-XBT_PUBLIC(void) surf_host_model_init_compound();
+XBT_PUBLIC void surf_host_model_init_compound();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the current best network and cpu models at hand
@@ -300,7 +300,7 @@ XBT_PUBLIC(void) surf_host_model_init_compound();
  *  traffic support) and the CPU model with the model Cas01.
  *  Such model is subject to modification with warning in the ChangeLog so monitor it!
  */
-XBT_PUBLIC(void) surf_host_model_init_current_default();
+XBT_PUBLIC void surf_host_model_init_current_default();
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the model L07
@@ -308,12 +308,12 @@ XBT_PUBLIC(void) surf_host_model_init_current_default();
  *  With this model, only parallel tasks can be used. Resource sharing is done by identifying bottlenecks and giving an
  *  equal share of the model to each action.
  */
-XBT_PUBLIC(void) surf_host_model_init_ptask_L07();
+XBT_PUBLIC void surf_host_model_init_ptask_L07();
 
 /** \ingroup SURF_models
  *  \brief The list of all available host model models
  */
-XBT_PUBLIC_DATA(s_surf_model_description_t) surf_host_model_description[];
+XBT_PUBLIC_DATA s_surf_model_description_t surf_host_model_description[];
 
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the current best network and cpu models at hand
@@ -323,7 +323,7 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_host_model_description[];
  *  traffic support) and the CPU model with the model Cas01.
  *  Such model is subject to modification with warning in the ChangeLog so monitor it!
  */
-XBT_PUBLIC(void) surf_vm_model_init_HL13();
+XBT_PUBLIC void surf_vm_model_init_HL13();
 
 /*** SURF Globals **************************/
 
@@ -337,14 +337,14 @@ XBT_PUBLIC(void) surf_vm_model_init_HL13();
  *
  *  \see surf_host_model_init_CM02(), surf_host_model_init_compound(), surf_exit()
  */
-XBT_PUBLIC(void) surf_init(int* argc, char** argv); /* initialize common structures */
+XBT_PUBLIC void surf_init(int* argc, char** argv); /* initialize common structures */
 
 /** \ingroup SURF_simulation
  *  \brief Finish simulation initialization
  *
  *  This function must be called before the first call to surf_solve()
  */
-XBT_PUBLIC(void) surf_presolve();
+XBT_PUBLIC void surf_presolve();
 
 /** \ingroup SURF_simulation
  *  \brief Performs a part of the simulation
@@ -356,14 +356,14 @@ XBT_PUBLIC(void) surf_presolve();
  *  when you call surf_solve.
  *  Note that the returned elapsed time can be zero.
  */
-XBT_PUBLIC(double) surf_solve(double max_date);
+XBT_PUBLIC double surf_solve(double max_date);
 
 /** \ingroup SURF_simulation
  *  \brief Return the current time
  *
  *  Return the current time in millisecond.
  */
-XBT_PUBLIC(double) surf_get_clock();
+XBT_PUBLIC double surf_get_clock();
 
 /** \ingroup SURF_simulation
  *  \brief Exit SURF
@@ -372,10 +372,10 @@ XBT_PUBLIC(double) surf_get_clock();
  *
  *  \see surf_init()
  */
-XBT_PUBLIC(void) surf_exit();
+XBT_PUBLIC void surf_exit();
 
 /* surf parse file related (public because called from a test suite) */
-XBT_PUBLIC(void) parse_platform_file(const char* file);
+XBT_PUBLIC void parse_platform_file(const char* file);
 
 /********** Tracing **********/
 
index bcccadc..be37b07 100644 (file)
@@ -55,7 +55,6 @@ static bool trace_basic;
 static bool trace_display_sizes = false;
 static bool trace_disable_link;
 static bool trace_disable_power;
-static int trace_precision;
 
 static bool trace_configured = false;
 static bool trace_active     = false;
@@ -82,7 +81,6 @@ static void TRACE_getopts()
   trace_display_sizes       = xbt_cfg_get_boolean(OPT_TRACING_DISPLAY_SIZES);
   trace_disable_link        = xbt_cfg_get_boolean(OPT_TRACING_DISABLE_LINK);
   trace_disable_power       = xbt_cfg_get_boolean(OPT_TRACING_DISABLE_POWER);
-  trace_precision           = xbt_cfg_get_int(OPT_TRACING_PRECISION);
 }
 
 int TRACE_start()
index 7569078..6e3af55 100644 (file)
@@ -213,11 +213,11 @@ XBT_PRIVATE bool TRACE_display_sizes();
 XBT_PRIVATE int TRACE_precision();
 
 /* Public functions used in SMPI */
-XBT_PUBLIC(bool) TRACE_smpi_is_enabled();
-XBT_PUBLIC(bool) TRACE_smpi_is_grouped();
-XBT_PUBLIC(bool) TRACE_smpi_is_computing();
-XBT_PUBLIC(bool) TRACE_smpi_is_sleeping();
-XBT_PUBLIC(bool) TRACE_smpi_view_internals();
+XBT_PUBLIC bool TRACE_smpi_is_enabled();
+XBT_PUBLIC bool TRACE_smpi_is_grouped();
+XBT_PUBLIC bool TRACE_smpi_is_computing();
+XBT_PUBLIC bool TRACE_smpi_is_sleeping();
+XBT_PUBLIC bool TRACE_smpi_view_internals();
 
 /* from resource_utilization.c */
 XBT_PRIVATE void TRACE_surf_host_set_utilization(const char* resource, const char* category, double value, double now,
index def907b..69e79bb 100644 (file)
@@ -19,7 +19,6 @@ XBT_PRIVATE const char* TRACE_internal_smpi_get_category();
 XBT_PRIVATE void TRACE_smpi_computing_init(int rank);
 XBT_PRIVATE void TRACE_smpi_computing_out(int rank);
 XBT_PRIVATE void TRACE_smpi_computing_in(int rank, double amount);
-XBT_PRIVATE void TRACE_smpi_sleeping_init(int rank);
 XBT_PRIVATE void TRACE_smpi_sleeping_out(int rank);
 XBT_PRIVATE void TRACE_smpi_sleeping_in(int rank, double duration);
 XBT_PRIVATE void TRACE_smpi_testing_out(int rank);
index df3b893..c8c4895 100644 (file)
@@ -7,6 +7,7 @@
 #include "simgrid/s4u/Host.hpp"
 #include "src/kernel/routing/NetPoint.hpp"
 #include "src/kernel/routing/NetZoneImpl.hpp"
+#include "src/surf/StorageImpl.hpp"
 
 #include <algorithm>
 
@@ -36,6 +37,10 @@ EngineImpl::~EngineImpl()
   delete netRoot_;
   for (auto const& kv : netpoints_)
     delete kv.second;
+
+  for (auto const& kv : storages_)
+    if (kv.second)
+      delete kv.second->getImpl();
 }
 }
 }
index 4e2ef24..cba6843 100644 (file)
@@ -20,6 +20,7 @@ public:
 
 private:
   std::map<std::string, simgrid::s4u::Host*> hosts_;
+  std::map<std::string, simgrid::s4u::Storage*> storages_;
   std::unordered_map<std::string, simgrid::kernel::routing::NetPoint*> netpoints_;
   friend simgrid::s4u::Engine;
 };
index 24f6e48..dba9a7a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -19,25 +19,25 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-  XBT_PUBLIC_CLASS ActivityImpl {
-  public:
-    ActivityImpl();
-    virtual ~ActivityImpl();
-    e_smx_state_t state = SIMIX_WAITING; /* State of the activity */
-    std::string name;                    /* Activity name if any */
-    std::list<smx_simcall_t> simcalls;   /* List of simcalls waiting for this activity */
-
-    virtual void suspend()=0;
-    virtual void resume()=0;
-    virtual void post() =0; // What to do when a simcall terminates
-
-    // boost::intrusive_ptr<ActivityImpl> support:
-    friend XBT_PUBLIC(void) intrusive_ptr_add_ref(ActivityImpl * activity);
-    friend XBT_PUBLIC(void) intrusive_ptr_release(ActivityImpl * activity);
-
-  private:
-    std::atomic_int_fast32_t refcount_{0};
-  };
+class XBT_PUBLIC ActivityImpl {
+public:
+  ActivityImpl();
+  virtual ~ActivityImpl();
+  e_smx_state_t state = SIMIX_WAITING; /* State of the activity */
+  std::string name;                    /* Activity name if any */
+  std::list<smx_simcall_t> simcalls;   /* List of simcalls waiting for this activity */
+
+  virtual void suspend() = 0;
+  virtual void resume()  = 0;
+  virtual void post()    = 0; // What to do when a simcall terminates
+
+  // boost::intrusive_ptr<ActivityImpl> support:
+  friend XBT_PUBLIC void intrusive_ptr_add_ref(ActivityImpl* activity);
+  friend XBT_PUBLIC void intrusive_ptr_release(ActivityImpl* activity);
+
+private:
+  std::atomic_int_fast32_t refcount_{0};
+};
 }}} // namespace simgrid::kernel::activity
 
 #endif /* SIMGRID_KERNEL_ACTIVITY_ACTIVITYIMPL_HPP */
index 86e44d1..849f605 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -15,8 +15,7 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-XBT_PUBLIC_CLASS CommImpl : public ActivityImpl
-{
+class XBT_PUBLIC CommImpl : public ActivityImpl {
   ~CommImpl() override;
 
 public:
index 4b11447..17f82ae 100644 (file)
@@ -13,8 +13,7 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-XBT_PUBLIC_CLASS ExecImpl : public ActivityImpl
-{
+class XBT_PUBLIC ExecImpl : public ActivityImpl {
   ~ExecImpl() override;
 
 public:
index 6b94db7..7d90c8a 100644 (file)
@@ -81,7 +81,7 @@ void MutexImpl::unlock(smx_actor_t issuer)
 
   /* If the mutex is not owned by the issuer, that's not good */
   if (issuer != this->owner)
-    THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%lu), not by you.",
+    THROWF(mismatch_error, 0, "Cannot release that mutex: it was locked by %s (pid:%ld), not by you.",
            this->owner->getCname(), this->owner->pid);
 
   if (not this->sleeping.empty()) {
index 1274e79..fb90e8e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2018. 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. */
@@ -14,7 +14,7 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-class XBT_PUBLIC() MutexImpl {
+class XBT_PUBLIC MutexImpl {
 public:
   MutexImpl();
   ~MutexImpl();
index 38c781f..2713736 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -13,8 +13,7 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-XBT_PUBLIC_CLASS SleepImpl : public ActivityImpl
-{
+class XBT_PUBLIC SleepImpl : public ActivityImpl {
 public:
   void suspend() override;
   void resume() override;
index b7f7e1b..03efd48 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -13,8 +13,7 @@ namespace simgrid {
 namespace kernel {
 namespace activity {
 
-XBT_PUBLIC_CLASS IoImpl : public ActivityImpl
-{
+class XBT_PUBLIC IoImpl : public ActivityImpl {
 public:
   void suspend() override;
   void resume() override;
index eaa8e9c..40b3887 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -14,8 +14,7 @@ namespace kernel {
 namespace activity {
 
   /** Used to implement mutexes, semaphores and conditions */
-XBT_PUBLIC_CLASS RawImpl : public ActivityImpl
-{
+class XBT_PUBLIC RawImpl : public ActivityImpl {
 public:
   ~RawImpl() override;
   void suspend() override;
index 7b53ca9..373df85 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -37,107 +37,88 @@ namespace simgrid {
 namespace kernel {
 namespace context {
 
-  XBT_PUBLIC_CLASS ContextFactory {
-  private:
-    std::string name_;
-  public:
-
-    explicit ContextFactory(std::string name) : name_(std::move(name)) {}
-    virtual ~ContextFactory();
-    virtual Context* create_context(std::function<void()> code,
-      void_pfn_smxprocess_t cleanup, smx_actor_t process) = 0;
-
-    // Optional methods for attaching main() as a context:
-
-    /** Creates a context from the current context of execution
+class XBT_PUBLIC ContextFactory {
+private:
+  std::string name_;
+
+public:
+  explicit ContextFactory(std::string name) : name_(std::move(name)) {}
+  virtual ~ContextFactory();
+  virtual Context* create_context(std::function<void()> code, void_pfn_smxprocess_t cleanup, smx_actor_t process) = 0;
+
+  // Optional methods for attaching main() as a context:
+
+  /** Creates a context from the current context of execution
+   *
+   *  This will not work on all implementation of `ContextFactory`.
+   */
+  virtual Context* attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process);
+  virtual Context* create_maestro(std::function<void()> code, smx_actor_t process);
+
+  virtual void run_all() = 0;
+  virtual Context* self();
+  std::string const& name() const { return name_; }
+private:
+  void declare_context(void* T, std::size_t size);
+
+protected:
+  template <class T, class... Args> T* new_context(Args&&... args)
+  {
+    T* context = new T(std::forward<Args>(args)...);
+    this->declare_context(context, sizeof(T));
+    return context;
+  }
+};
+
+class XBT_PUBLIC Context {
+private:
+  std::function<void()> code_;
+  void_pfn_smxprocess_t cleanup_func_ = nullptr;
+  smx_actor_t process_                = nullptr;
+
+public:
+  class StopRequest {
+    /** @brief Exception launched to kill a process, in order to properly unwind its stack and release RAII stuff
      *
-     *  This will not work on all implementation of `ContextFactory`.
+     * Nope, Sonar, this should not inherit of std::exception.
+     * Otherwise, users may accidentally catch it with a try {} catch (std::exception)
      */
-    virtual Context* attach(void_pfn_smxprocess_t cleanup_func, smx_actor_t process);
-    virtual Context* create_maestro(std::function<void()> code, smx_actor_t process);
-
-    virtual void run_all() = 0;
-    virtual Context* self();
-    std::string const& name() const
-    {
-      return name_;
-    }
-  private:
-    void declare_context(void* T, std::size_t size);
-  protected:
-    template<class T, class... Args>
-    T* new_context(Args&&... args)
-    {
-      T* context = new T(std::forward<Args>(args)...);
-      this->declare_context(context, sizeof(T));
-      return context;
-    }
-  };
-
-  XBT_PUBLIC_CLASS Context {
-  private:
-    std::function<void()> code_;
-    void_pfn_smxprocess_t cleanup_func_ = nullptr;
-    smx_actor_t process_ = nullptr;
-  public:
-    class StopRequest {
-      /** @brief Exception launched to kill a process, in order to properly unwind its stack and release RAII stuff
-       *
-       * Nope, Sonar, this should not inherit of std::exception.
-       * Otherwise, users may accidentally catch it with a try {} catch (std::exception)
-       */
-    };
-    bool iwannadie;
-
-    Context(std::function<void()> code,
-            void_pfn_smxprocess_t cleanup_func,
-            smx_actor_t process);
-    void operator()()
-    {
-      code_();
-    }
-    bool has_code() const
-    {
-      return static_cast<bool>(code_);
-    }
-    smx_actor_t process()
-    {
-      return this->process_;
-    }
-    void set_cleanup(void_pfn_smxprocess_t cleanup)
-    {
-      cleanup_func_ = cleanup;
-    }
-
-    // Virtual methods
-    virtual ~Context();
-    virtual void stop();
-    virtual void suspend() = 0;
   };
-
-  XBT_PUBLIC_CLASS AttachContext : public Context {
-  public:
-
-    AttachContext(std::function<void()> code,
-            void_pfn_smxprocess_t cleanup_func,
-            smx_actor_t process)
+  bool iwannadie;
+
+  Context(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process);
+  void operator()() { code_(); }
+  bool has_code() const { return static_cast<bool>(code_); }
+  smx_actor_t process() { return this->process_; }
+  void set_cleanup(void_pfn_smxprocess_t cleanup) { cleanup_func_ = cleanup; }
+
+  // Virtual methods
+  virtual ~Context();
+  virtual void stop();
+  virtual void suspend() = 0;
+};
+
+class XBT_PUBLIC AttachContext : public Context {
+public:
+  AttachContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t process)
       : Context(std::move(code), cleanup_func, process)
-    {}
+  {
+  }
 
-    ~AttachContext() override;
+  ~AttachContext() override;
 
-    /** Called by the context when it is ready to give control
-     *  to the maestro.
-     */
-    virtual void attach_start() = 0;
+  /** Called by the context when it is ready to give control
+   *  to the maestro.
+   */
+  virtual void attach_start() = 0;
 
-    /** Called by the context when it has finished its job */
-    virtual void attach_stop() = 0;
-  };
+  /** Called by the context when it has finished its job */
+  virtual void attach_stop() = 0;
+};
 
 /* This allows Java to hijack the context factory (Java induces factories of factory :) */
 typedef ContextFactory* (*ContextFactoryInitializer)();
-XBT_PUBLIC_DATA(ContextFactoryInitializer) factory_initializer;
+XBT_PUBLIC_DATA ContextFactoryInitializer factory_initializer;
 
 XBT_PRIVATE ContextFactory* thread_factory();
 XBT_PRIVATE ContextFactory* sysv_factory();
@@ -153,11 +134,11 @@ extern "C" {
 XBT_PRIVATE void SIMIX_context_mod_init();
 XBT_PRIVATE void SIMIX_context_mod_exit();
 
-XBT_PUBLIC(smx_context_t)
-SIMIX_context_new(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t simix_process);
+XBT_PUBLIC smx_context_t SIMIX_context_new(std::function<void()> code, void_pfn_smxprocess_t cleanup_func,
+                                           smx_actor_t simix_process);
 
 #ifndef WIN32
-XBT_PUBLIC_DATA(char sigsegv_stack[SIGSTKSZ]);
+XBT_PUBLIC_DATA char sigsegv_stack[SIGSTKSZ];
 #endif
 
 /* We are using the bottom of the stack to save some information, like the
@@ -173,15 +154,15 @@ XBT_PUBLIC_DATA(char sigsegv_stack[SIGSTKSZ]);
 /** @brief Executes all the processes to run (in parallel if possible). */
 XBT_PRIVATE void SIMIX_context_runall();
 /** @brief returns the current running context */
-XBT_PUBLIC(smx_context_t) SIMIX_context_self(); // public because it's used in simgrid-java
+XBT_PUBLIC smx_context_t SIMIX_context_self(); // public because it's used in simgrid-java
 
 XBT_PRIVATE void *SIMIX_context_stack_new();
 XBT_PRIVATE void SIMIX_context_stack_delete(void *stack);
 
-XBT_PUBLIC(void) SIMIX_context_set_current(smx_context_t context);
+XBT_PUBLIC void SIMIX_context_set_current(smx_context_t context);
 XBT_PRIVATE smx_context_t SIMIX_context_get_current();
 
-XBT_PUBLIC(int) SIMIX_process_get_maxpid();
+XBT_PUBLIC int SIMIX_process_get_maxpid();
 
 XBT_PRIVATE void SIMIX_post_create_environment();
 }
index d0930c0..c64d4d6 100644 (file)
@@ -138,29 +138,28 @@ namespace lmm {
  * @brief Solve the lmm system
  * @param sys The lmm system to solve
  */
-XBT_PUBLIC(void) lmm_solve(lmm_system_t sys);
+XBT_PUBLIC void lmm_solve(lmm_system_t sys);
 
-XBT_PUBLIC(void) lagrange_solve(lmm_system_t sys);
-XBT_PUBLIC(void) bottleneck_solve(lmm_system_t sys);
+XBT_PUBLIC void lagrange_solve(lmm_system_t sys);
+XBT_PUBLIC void bottleneck_solve(lmm_system_t sys);
 
 /** Default functions associated to the chosen protocol. When using the lagrangian approach. */
 
-XBT_PUBLIC(void)
-set_default_protocol_function(double (*func_f)(const Variable& var, double x),
-                              double (*func_fp)(const Variable& var, double x),
-                              double (*func_fpi)(const Variable& var, double x));
+XBT_PUBLIC void set_default_protocol_function(double (*func_f)(const Variable& var, double x),
+                                              double (*func_fp)(const Variable& var, double x),
+                                              double (*func_fpi)(const Variable& var, double x));
 
-XBT_PUBLIC(double) func_reno_f(const Variable& var, double x);
-XBT_PUBLIC(double) func_reno_fp(const Variable& var, double x);
-XBT_PUBLIC(double) func_reno_fpi(const Variable& var, double x);
+XBT_PUBLIC double func_reno_f(const Variable& var, double x);
+XBT_PUBLIC double func_reno_fp(const Variable& var, double x);
+XBT_PUBLIC double func_reno_fpi(const Variable& var, double x);
 
-XBT_PUBLIC(double) func_reno2_f(const Variable& var, double x);
-XBT_PUBLIC(double) func_reno2_fp(const Variable& var, double x);
-XBT_PUBLIC(double) func_reno2_fpi(const Variable& var, double x);
+XBT_PUBLIC double func_reno2_f(const Variable& var, double x);
+XBT_PUBLIC double func_reno2_fp(const Variable& var, double x);
+XBT_PUBLIC double func_reno2_fpi(const Variable& var, double x);
 
-XBT_PUBLIC(double) func_vegas_f(const Variable& var, double x);
-XBT_PUBLIC(double) func_vegas_fp(const Variable& var, double x);
-XBT_PUBLIC(double) func_vegas_fpi(const Variable& var, double x);
+XBT_PUBLIC double func_vegas_f(const Variable& var, double x);
+XBT_PUBLIC double func_vegas_fp(const Variable& var, double x);
+XBT_PUBLIC double func_vegas_fpi(const Variable& var, double x);
 
 /**
  * @brief LMM element
@@ -169,8 +168,7 @@ XBT_PUBLIC(double) func_vegas_fpi(const Variable& var, double x);
  * Then, it is used to list all variables involved in constraint through constraint's xxx_element_set lists, or
  * vice-versa list all constraints for a given variable.
  */
-XBT_PUBLIC_CLASS Element
-{
+class XBT_PUBLIC Element {
 public:
   int get_concurrency() const;
   void decrease_concurrency();
@@ -207,8 +205,7 @@ struct ConstraintLight {
  * \li Active elements which variable's weight is non-zero (i.e. it is enabled) AND its element value is non-zero.
  *     LMM_solve iterates over active elements during resolution, dynamically making them active or unactive.
  */
-XBT_PUBLIC_CLASS Constraint
-{
+class XBT_PUBLIC Constraint {
 public:
   Constraint() = delete;
   Constraint(void* id_value, double bound_value);
@@ -334,8 +331,7 @@ private:
  * When something prevents us from enabling a variable, we "stage" the weight that we would have like to set, so that as
  * soon as possible we enable the variable with desired weight
  */
-XBT_PUBLIC_CLASS Variable
-{
+class XBT_PUBLIC Variable {
 public:
   void initialize(simgrid::kernel::resource::Action * id_value, double sharing_weight_value, double bound_value,
                   int number_of_constraints, unsigned visited_value);
@@ -443,8 +439,7 @@ inline void Element::make_inactive()
 /**
  * @brief LMM system
  */
-XBT_PUBLIC_CLASS System
-{
+class XBT_PUBLIC System {
 public:
   /**
    * @brief Create a new Linear MaxMim system
index 827fccf..ef60eae 100644 (file)
@@ -21,8 +21,7 @@ typedef boost::heap::pairing_heap<heap_element_type, boost::heap::constant_time_
  * @brief SURF action interface class
  * @details An action is an event generated by a resource (e.g.: a communication for the network)
  */
-XBT_PUBLIC_CLASS Action
-{
+class XBT_PUBLIC Action {
 public:
   boost::intrusive::list_member_hook<> modifiedSetHook_; /* Used by the lazy update to list the actions to track */
   bool isLinkedModifiedSet() const { return modifiedSetHook_.is_linked(); }
index e947ad3..f1123d6 100644 (file)
@@ -16,8 +16,7 @@ namespace resource {
  * @brief SURF model interface class
  * @details A model is an object which handle the interactions between its Resources and its Actions
  */
-XBT_PUBLIC_CLASS Model
-{
+class XBT_PUBLIC Model {
 public:
   Model();
   virtual ~Model();
index 8bf9885..c8eb5c6 100644 (file)
@@ -16,8 +16,7 @@ namespace resource {
  * @brief SURF resource interface class
  * @details This is the ancestor class of every resources in SimGrid, such as links, CPU or storage
  */
-XBT_PUBLIC_CLASS Resource
-{
+class XBT_PUBLIC Resource {
 public:
   /**
    * @brief Constructor of LMM Resources
index f676e41..492613b 100644 (file)
@@ -58,7 +58,7 @@ public:
  *    is also not realistic, as blue level can use more links than a single
  *    Aries can handle, thus it should use several routers.
  */
-XBT_PUBLIC_CLASS DragonflyZone : public ClusterZone {
+class XBT_PUBLIC DragonflyZone : public ClusterZone {
 public:
   explicit DragonflyZone(NetZone* father, std::string name);
   ~DragonflyZone() override;
index 3670c70..d72d8b0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2018. 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. */
@@ -21,6 +21,8 @@ NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl*
 {
   if (netzone_p != nullptr)
     id_ = netzone_p->addComponent(this);
+  else
+    id_ = static_cast<decltype(id_)>(-1);
   simgrid::s4u::Engine::getInstance()->netpointRegister(this);
   simgrid::kernel::routing::NetPoint::onCreation(this);
 }
index 0a48274..ee02d4a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2018. 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. */
@@ -54,6 +54,6 @@ private:
 }
 }
 
-XBT_PUBLIC(sg_netpoint_t) sg_netpoint_by_name_or_null(const char* name);
+XBT_PUBLIC sg_netpoint_t sg_netpoint_by_name_or_null(const char* name);
 
 #endif /* KERNEL_ROUTING_NETPOINT_HPP_ */
index 9e0b013..acfb8d3 100644 (file)
@@ -48,8 +48,7 @@ class BypassRoute;
  * called Autonomous Systems in this article).
  *
  */
-XBT_PUBLIC_CLASS NetZoneImpl : public s4u::NetZone
-{
+class XBT_PUBLIC NetZoneImpl : public s4u::NetZone {
   friend simgrid::kernel::EngineImpl; // it destroys netRoot_
 
 protected:
index d69ba24..c0ea47c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016-2017. The SimGrid Team.
+/* Copyright (c) 2016-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -64,10 +64,9 @@ protected:
   Session& getSession() { return *session_; }
 };
 
-XBT_PUBLIC() Checker* createLivenessChecker(Session& session);
-XBT_PUBLIC() Checker* createSafetyChecker(Session& session);
-XBT_PUBLIC() Checker* createCommunicationDeterminismChecker(Session& session);
-
+XBT_PUBLIC Checker* createLivenessChecker(Session& session);
+XBT_PUBLIC Checker* createSafetyChecker(Session& session);
+XBT_PUBLIC Checker* createCommunicationDeterminismChecker(Session& session);
 }
 }
 
index 4fedf30..ac155f2 100644 (file)
@@ -245,7 +245,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim
   } else
     xbt_die("Unexpected call_type %i", (int) call_type);
 
-  XBT_DEBUG("Insert incomplete comm pattern %p for process %lu", pattern.get(), issuer->pid);
+  XBT_DEBUG("Insert incomplete comm pattern %p for process %ld", pattern.get(), issuer->pid);
   xbt_dynar_t dynar = xbt_dynar_get_as(incomplete_communications_pattern, issuer->pid, xbt_dynar_t);
   simgrid::mc::PatternCommunication* pattern2 = pattern.release();
   xbt_dynar_push(dynar, &pattern2);
index 8bad4a5..391a1aa 100644 (file)
@@ -245,7 +245,7 @@ void SafetyChecker::backtrack()
         } else {
 
           const smx_actor_t previous_issuer = MC_smx_simcall_get_issuer(&prev_state->internal_req);
-          XBT_DEBUG("Simcall %d, process %lu (state %d) and simcall %d, process %lu (state %d) are independent",
+          XBT_DEBUG("Simcall %d, process %ld (state %d) and simcall %d, process %ld (state %d) are independent",
                     req->call, issuer->pid, state->num,
                     prev_state->internal_req.call,
                     previous_issuer->pid,
index cede412..23d2626 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2018. 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. */
 
 namespace simgrid {
 namespace mc {
-XBT_PUBLIC_CLASS DeadlockError{};
-XBT_PUBLIC_CLASS TerminationError{};
-XBT_PUBLIC_CLASS LivenessError{};
+class XBT_PUBLIC DeadlockError {
+};
+class XBT_PUBLIC TerminationError {
+};
+class XBT_PUBLIC LivenessError {
+};
 }
 }
 
index 58f1795..f146f50 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2018. 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. */
@@ -12,7 +12,7 @@
 #include <ucontext.h>           /* context relative declarations */
 
 SG_BEGIN_DECL();
-XBT_PUBLIC(void) MC_register_stack_area(void *stack, smx_actor_t process, ucontext_t* context, size_t size);
+XBT_PUBLIC void MC_register_stack_area(void* stack, smx_actor_t process, ucontext_t* context, size_t size);
 SG_END_DECL();
 
 #endif
index c4c2dd8..813d138 100644 (file)
@@ -13,7 +13,7 @@
  *
  *  This is using the format generated by traceToString().
  */
-XBT_PUBLIC_DATA(std::string) MC_record_path;
+XBT_PUBLIC_DATA std::string MC_record_path;
 
 /** Whether the replay mode is enabled */
 static inline int MC_record_replay_is_active()
index de861f4..b7e23eb 100644 (file)
@@ -222,10 +222,10 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
     char* p = pointer_to_string(simcall_comm_isend__get__src_buff(req));
     char* bs = buff_size_to_string(simcall_comm_isend__get__src_buff_size(req));
     if (issuer->host)
-      args = bprintf("src=(%lu)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
+      args = bprintf("src=(%ld)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
                      MC_smx_actor_get_name(issuer), p, bs);
     else
-      args = bprintf("src=(%lu)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
+      args = bprintf("src=(%ld)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
     xbt_free(bs);
     xbt_free(p);
     break;
@@ -242,10 +242,10 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
     char* p = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
     char* bs = buff_size_to_string(size);
     if (issuer->host)
-      args = bprintf("dst=(%lu)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
+      args = bprintf("dst=(%ld)%s (%s), buff=%s, size=%s", issuer->pid, MC_smx_actor_get_host_name(issuer),
                      MC_smx_actor_get_name(issuer), p, bs);
     else
-      args = bprintf("dst=(%lu)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
+      args = bprintf("dst=(%ld)%s, buff=%s, size=%s", issuer->pid, MC_smx_actor_get_name(issuer), p, bs);
     xbt_free(bs);
     xbt_free(p);
     break;
@@ -275,7 +275,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_proc));
       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_proc));
       args =
-          bprintf("comm=%s [(%lu)%s (%s)-> (%lu)%s (%s)]", p, src_proc ? src_proc->pid : 0,
+          bprintf("comm=%s [(%ld)%s (%s)-> (%ld)%s (%s)]", p, src_proc ? src_proc->pid : 0,
                   src_proc ? MC_smx_actor_get_host_name(src_proc) : "", src_proc ? MC_smx_actor_get_name(src_proc) : "",
                   dst_proc ? dst_proc->pid : 0, dst_proc ? MC_smx_actor_get_host_name(dst_proc) : "",
                   dst_proc ? MC_smx_actor_get_name(dst_proc) : "");
@@ -307,7 +307,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
 
       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->src_proc));
       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(act->dst_proc));
-      args = bprintf("comm=%s [(%lu)%s (%s) -> (%lu)%s (%s)]", p, src_proc->pid, MC_smx_actor_get_name(src_proc),
+      args = bprintf("comm=%s [(%ld)%s (%s) -> (%ld)%s (%s)]", p, src_proc->pid, MC_smx_actor_get_name(src_proc),
                      MC_smx_actor_get_host_name(src_proc), dst_proc->pid, MC_smx_actor_get_name(dst_proc),
                      MC_smx_actor_get_host_name(dst_proc));
     }
@@ -381,10 +381,10 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
 
   std::string str;
   if (args != nullptr)
-    str = simgrid::xbt::string_printf("[(%lu)%s (%s)] %s(%s)", issuer->pid, MC_smx_actor_get_host_name(issuer),
+    str = simgrid::xbt::string_printf("[(%ld)%s (%s)] %s(%s)", issuer->pid, MC_smx_actor_get_host_name(issuer),
                                       MC_smx_actor_get_name(issuer), type, args);
   else
-    str = simgrid::xbt::string_printf("[(%lu)%s (%s)] %s ", issuer->pid, MC_smx_actor_get_host_name(issuer),
+    str = simgrid::xbt::string_printf("[(%ld)%s (%s)] %s ", issuer->pid, MC_smx_actor_get_host_name(issuer),
                                       MC_smx_actor_get_name(issuer), type);
   xbt_free(args);
   return str;
@@ -453,24 +453,24 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
   switch (req->call) {
   case SIMCALL_COMM_ISEND:
     if (issuer->host)
-      label = simgrid::xbt::string_printf("[(%lu)%s] iSend", issuer->pid, MC_smx_actor_get_host_name(issuer));
+      label = simgrid::xbt::string_printf("[(%ld)%s] iSend", issuer->pid, MC_smx_actor_get_host_name(issuer));
     else
-      label = bprintf("[(%lu)] iSend", issuer->pid);
+      label = bprintf("[(%ld)] iSend", issuer->pid);
     break;
 
   case SIMCALL_COMM_IRECV:
     if (issuer->host)
-      label = simgrid::xbt::string_printf("[(%lu)%s] iRecv", issuer->pid, MC_smx_actor_get_host_name(issuer));
+      label = simgrid::xbt::string_printf("[(%ld)%s] iRecv", issuer->pid, MC_smx_actor_get_host_name(issuer));
     else
-      label = simgrid::xbt::string_printf("[(%lu)] iRecv", issuer->pid);
+      label = simgrid::xbt::string_printf("[(%ld)] iRecv", issuer->pid);
     break;
 
   case SIMCALL_COMM_WAIT:
     if (value == -1) {
       if (issuer->host)
-        label = simgrid::xbt::string_printf("[(%lu)%s] WaitTimeout", issuer->pid, MC_smx_actor_get_host_name(issuer));
+        label = simgrid::xbt::string_printf("[(%ld)%s] WaitTimeout", issuer->pid, MC_smx_actor_get_host_name(issuer));
       else
-        label = simgrid::xbt::string_printf("[(%lu)] WaitTimeout", issuer->pid);
+        label = simgrid::xbt::string_printf("[(%ld)] WaitTimeout", issuer->pid);
     } else {
       simgrid::kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
@@ -481,11 +481,11 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
       smx_actor_t src_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->src_proc));
       smx_actor_t dst_proc = mc_model_checker->process().resolveActor(simgrid::mc::remote(comm->dst_proc));
       if (issuer->host)
-        label = simgrid::xbt::string_printf("[(%lu)%s] Wait [(%lu)->(%lu)]", issuer->pid,
+        label = simgrid::xbt::string_printf("[(%ld)%s] Wait [(%ld)->(%ld)]", issuer->pid,
                                             MC_smx_actor_get_host_name(issuer), src_proc ? src_proc->pid : 0,
                                             dst_proc ? dst_proc->pid : 0);
       else
-        label = simgrid::xbt::string_printf("[(%lu)] Wait [(%lu)->(%lu)]",
+        label = simgrid::xbt::string_printf("[(%ld)] Wait [(%ld)->(%ld)]",
                     issuer->pid,
                     src_proc ? src_proc->pid : 0,
                     dst_proc ? dst_proc->pid : 0);
@@ -499,14 +499,14 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
     simgrid::kernel::activity::CommImpl* comm = temp_comm.getBuffer();
     if (comm->src_proc == nullptr || comm->dst_proc == nullptr) {
       if (issuer->host)
-        label = simgrid::xbt::string_printf("[(%lu)%s] Test FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
+        label = simgrid::xbt::string_printf("[(%ld)%s] Test FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
       else
-        label = bprintf("[(%lu)] Test FALSE", issuer->pid);
+        label = bprintf("[(%ld)] Test FALSE", issuer->pid);
     } else {
       if (issuer->host)
-        label = simgrid::xbt::string_printf("[(%lu)%s] Test TRUE", issuer->pid, MC_smx_actor_get_host_name(issuer));
+        label = simgrid::xbt::string_printf("[(%ld)%s] Test TRUE", issuer->pid, MC_smx_actor_get_host_name(issuer));
       else
-        label = simgrid::xbt::string_printf("[(%lu)] Test TRUE", issuer->pid);
+        label = simgrid::xbt::string_printf("[(%ld)] Test TRUE", issuer->pid);
     }
     break;
   }
@@ -515,10 +515,10 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
     unsigned long comms_size = read_length(
       mc_model_checker->process(), remote(simcall_comm_waitany__get__comms(req)));
     if (issuer->host)
-      label = simgrid::xbt::string_printf("[(%lu)%s] WaitAny [%d of %lu]", issuer->pid,
+      label = simgrid::xbt::string_printf("[(%ld)%s] WaitAny [%d of %lu]", issuer->pid,
                                           MC_smx_actor_get_host_name(issuer), value + 1, comms_size);
     else
-      label = simgrid::xbt::string_printf("[(%lu)] WaitAny [%d of %lu]",
+      label = simgrid::xbt::string_printf("[(%ld)] WaitAny [%d of %lu]",
                   issuer->pid, value + 1, comms_size);
     break;
   }
@@ -526,16 +526,16 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
   case SIMCALL_COMM_TESTANY:
     if (value == -1) {
       if (issuer->host)
-        label = simgrid::xbt::string_printf("[(%lu)%s] TestAny FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
+        label = simgrid::xbt::string_printf("[(%ld)%s] TestAny FALSE", issuer->pid, MC_smx_actor_get_host_name(issuer));
       else
-        label = simgrid::xbt::string_printf("[(%lu)] TestAny FALSE", issuer->pid);
+        label = simgrid::xbt::string_printf("[(%ld)] TestAny FALSE", issuer->pid);
     } else {
       if (issuer->host)
-        label = simgrid::xbt::string_printf("[(%lu)%s] TestAny TRUE [%d of %lu]", issuer->pid,
+        label = simgrid::xbt::string_printf("[(%ld)%s] TestAny TRUE [%d of %lu]", issuer->pid,
                                             MC_smx_actor_get_host_name(issuer), value + 1,
                                             simcall_comm_testany__get__count(req));
       else
-        label = simgrid::xbt::string_printf("[(%lu)] TestAny TRUE [%d of %lu]",
+        label = simgrid::xbt::string_printf("[(%ld)] TestAny TRUE [%d of %lu]",
                     issuer->pid,
                     value + 1,
                     simcall_comm_testany__get__count(req));
@@ -543,19 +543,19 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
     break;
 
   case SIMCALL_MUTEX_TRYLOCK:
-    label = simgrid::xbt::string_printf("[(%lu)] Mutex TRYLOCK", issuer->pid);
+    label = simgrid::xbt::string_printf("[(%ld)] Mutex TRYLOCK", issuer->pid);
     break;
 
   case SIMCALL_MUTEX_LOCK:
-    label = simgrid::xbt::string_printf("[(%lu)] Mutex LOCK", issuer->pid);
+    label = simgrid::xbt::string_printf("[(%ld)] Mutex LOCK", issuer->pid);
     break;
 
   case SIMCALL_MC_RANDOM:
     if (issuer->host)
-      label = simgrid::xbt::string_printf("[(%lu)%s] MC_RANDOM (%d)", issuer->pid, MC_smx_actor_get_host_name(issuer),
+      label = simgrid::xbt::string_printf("[(%ld)%s] MC_RANDOM (%d)", issuer->pid, MC_smx_actor_get_host_name(issuer),
                                           value);
     else
-      label = simgrid::xbt::string_printf("[(%lu)] MC_RANDOM (%d)", issuer->pid, value);
+      label = simgrid::xbt::string_printf("[(%ld)] MC_RANDOM (%d)", issuer->pid, value);
     break;
 
   default:
index dc10fd8..1d4cd21 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017. The SimGrid Team.
+/* Copyright (c) 2015-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@ namespace mc {
  *
  *  Send messages to the model-checker and handles message from it.
  */
-class XBT_PUBLIC() Client {
+class XBT_PUBLIC Client {
 private:
   Channel channel_;
   static std::unique_ptr<Client> instance_;
index aad5620..9845fdf 100644 (file)
@@ -93,13 +93,10 @@ void MSG_config(const char *key, const char *value){
 /** \ingroup msg_simulation
  * \brief Kill all running process
 
- * \param reset_PIDs should we reset the PID numbers. A negative
- *   number means no reset and a positive number will be used to set the PID
- *   of the next newly created process.
  */
-int MSG_process_killall(int reset_PIDs)
+int MSG_process_killall()
 {
-  simcall_process_killall(reset_PIDs);
+  simcall_process_killall();
 
   return 0;
 }
index cf12610..9cbcae0 100644 (file)
@@ -89,7 +89,7 @@ XBT_PRIVATE void TRACE_msg_process_destroy(std::string process_name, int process
 
 extern "C" {
 
-XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
+XBT_PUBLIC_DATA MSG_Global_t msg_global;
 
 /*************************************************************/
 XBT_PRIVATE void MSG_process_cleanup_from_SIMIX(smx_actor_t smx_proc);
index 78ea89d..a366f62 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -272,7 +272,8 @@ msg_error_t MSG_process_set_data(msg_process_t process, void *data)
  * \brief Sets a cleanup function to be called to free the userdata of a process when a process is destroyed.
  * \param data_cleanup a cleanup function for the userdata of a process, or nullptr to call no function
  */
-XBT_PUBLIC(void) MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup) {
+XBT_PUBLIC void MSG_process_set_data_cleanup(void_f_pvoid_t data_cleanup)
+{
   msg_global->process_data_cleanup = data_cleanup;
 }
 
@@ -481,21 +482,23 @@ void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void *data) {
  * \brief Sets the "auto-restart" flag of the process.
  * If the flag is set to 1, the process will be automatically restarted when its host comes back up.
  */
-XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart) {
+XBT_PUBLIC void MSG_process_auto_restart_set(msg_process_t process, int auto_restart)
+{
   process->setAutoRestart(auto_restart);
 }
 /**
  * \ingroup m_process_management
  * \brief Restarts a process from the beginning.
  */
-XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process) {
+XBT_PUBLIC msg_process_t MSG_process_restart(msg_process_t process)
+{
   return process->restart();
 }
 
 /** @ingroup m_process_management
  * @brief This process will be terminated automatically when the last non-daemon process finishes
  */
-XBT_PUBLIC(void) MSG_process_daemonize(msg_process_t process)
+XBT_PUBLIC void MSG_process_daemonize(msg_process_t process)
 {
   process->daemonize();
 }
@@ -503,14 +506,14 @@ XBT_PUBLIC(void) MSG_process_daemonize(msg_process_t process)
 /** @ingroup m_process_management
  * @brief Take an extra reference on that process to prevent it to be garbage-collected
  */
-XBT_PUBLIC(void) MSG_process_ref(msg_process_t process)
+XBT_PUBLIC void MSG_process_ref(msg_process_t process)
 {
   intrusive_ptr_add_ref(process);
 }
 /** @ingroup m_process_management
  * @brief Release a reference on that process so that it can get be garbage-collected
  */
-XBT_PUBLIC(void) MSG_process_unref(msg_process_t process)
+XBT_PUBLIC void MSG_process_unref(msg_process_t process)
 {
   intrusive_ptr_release(process);
 }
index 6535c3d..d2e742d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -24,8 +24,7 @@ namespace s4u {
  * mountpoints.
  * For now, you cannot change the mountpoints programatically, and must declare them from your platform file.
  */
-XBT_PUBLIC_CLASS File
-{
+class XBT_PUBLIC File {
 public:
   File(std::string fullpath, void* userdata);
   File(std::string fullpath, sg_host_t host, void* userdata);
@@ -70,7 +69,7 @@ private:
   void* userdata_             = nullptr;
 };
 
-XBT_PUBLIC_CLASS FileSystemStorageExt {
+class XBT_PUBLIC FileSystemStorageExt {
 public:
   static simgrid::xbt::Extension<Storage, FileSystemStorageExt> EXTENSION_ID;
   explicit FileSystemStorageExt(Storage* ptr);
@@ -87,8 +86,7 @@ private:
   sg_size_t size_     = 0;
 };
 
-XBT_PUBLIC_CLASS FileDescriptorHostExt
-{
+class XBT_PUBLIC FileDescriptorHostExt {
 public:
   static simgrid::xbt::Extension<Host, FileDescriptorHostExt> EXTENSION_ID;
   FileDescriptorHostExt() = default;
index 3ffbfde..0be3938 100644 (file)
@@ -27,8 +27,7 @@ namespace vm {
  * @brief SURF VM interface class
  * @details A VM represent a virtual machine
  */
-XBT_PUBLIC_CLASS VirtualMachineImpl : public surf::HostImpl, public simgrid::xbt::Extendable<VirtualMachineImpl>
-{
+class XBT_PUBLIC VirtualMachineImpl : public surf::HostImpl, public simgrid::xbt::Extendable<VirtualMachineImpl> {
   friend simgrid::s4u::VirtualMachine;
 
 public:
@@ -107,6 +106,6 @@ public:
 }
 }
 
-XBT_PUBLIC_DATA(simgrid::vm::VMModel*) surf_vm_model;
+XBT_PUBLIC_DATA simgrid::vm::VMModel* surf_vm_model;
 
 #endif /* VM_INTERFACE_HPP_ */
index 57a78fe..b9957b2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
@@ -168,26 +168,28 @@ double Actor::getKillTime()
 
 void Actor::kill(aid_t pid)
 {
+  smx_actor_t killer  = SIMIX_process_self();
   smx_actor_t process = SIMIX_process_from_PID(pid);
   if(process != nullptr) {
-    simgrid::simix::kernelImmediate([process] { SIMIX_process_kill(process, process); });
+    simgrid::simix::kernelImmediate([killer, process] { SIMIX_process_kill(process, killer); });
   } else {
     std::ostringstream oss;
-    oss << "kill: ("<< pid <<") - No such process" << std::endl;
+    oss << "kill: (" << pid << ") - No such actor" << std::endl;
     throw std::runtime_error(oss.str());
   }
 }
 
-smx_actor_t Actor::getImpl() {
-  return pimpl_;
-}
-
 void Actor::kill() {
   smx_actor_t process = SIMIX_process_self();
   simgrid::simix::kernelImmediate(
       [this, process] { SIMIX_process_kill(pimpl_, (pimpl_ == simix_global->maestro_process) ? pimpl_ : process); });
 }
 
+smx_actor_t Actor::getImpl()
+{
+  return pimpl_;
+}
+
 // ***** Static functions *****
 
 ActorPtr Actor::byPid(aid_t pid)
@@ -201,12 +203,7 @@ ActorPtr Actor::byPid(aid_t pid)
 
 void Actor::killAll()
 {
-  simcall_process_killall(1);
-}
-
-void Actor::killAll(int resetPid)
-{
-  simcall_process_killall(resetPid);
+  simcall_process_killall();
 }
 
 std::map<std::string, std::string>* Actor::getProperties()
@@ -260,7 +257,7 @@ void yield()
   simgrid::simix::kernelImmediate([] { /* do nothing*/ });
 }
 
-XBT_PUBLIC(void) sleep_until(double timeout)
+XBT_PUBLIC void sleep_until(double timeout)
 {
   double now = SIMIX_get_clock();
   if (timeout > now)
index e49b59d..542eb68 100644 (file)
@@ -94,6 +94,7 @@ Engine::getHostList(std::vector<Host*>* list)
   for (auto const& kv : pimpl->hosts_)
     list->push_back(kv.second);
 }
+
 /** @brief Returns the list of all hosts found in the platform */
 std::vector<Host*> Engine::getAllHosts()
 {
@@ -102,29 +103,64 @@ std::vector<Host*> Engine::getAllHosts()
     res.push_back(kv.second);
   return res;
 }
+
 void Engine::addHost(std::string name, simgrid::s4u::Host* host)
 {
   pimpl->hosts_[name] = host;
 }
+
 void Engine::delHost(std::string name)
 {
   pimpl->hosts_.erase(name);
 }
+
 simgrid::s4u::Host* Engine::hostByName(std::string name)
 {
   return pimpl->hosts_.at(name); // Will raise a std::out_of_range if the host does not exist
 }
+
 simgrid::s4u::Host* Engine::hostByNameOrNull(std::string name)
 {
   auto host = pimpl->hosts_.find(name);
   return host == pimpl->hosts_.end() ? nullptr : host->second;
 }
 
+/** @brief Returns the list of all storages found in the platform */
+std::vector<Storage*> Engine::getAllStorages()
+{
+  std::vector<Storage*> res;
+  for (auto const& kv : pimpl->storages_)
+    res.push_back(kv.second);
+  return res;
+}
+
+simgrid::s4u::Storage* Engine::storageByName(std::string name)
+{
+  return pimpl->storages_.at(name); // Will raise a std::out_of_range if the host does not exist
+}
+
+simgrid::s4u::Storage* Engine::storageByNameOrNull(std::string name)
+{
+  auto storage = pimpl->storages_.find(name);
+  return storage == pimpl->storages_.end() ? nullptr : storage->second;
+}
+
+void Engine::addStorage(std::string name, simgrid::s4u::Storage* storage)
+{
+  pimpl->storages_[name] = storage;
+}
+
+void Engine::delStorage(std::string name)
+{
+  pimpl->storages_.erase(name);
+}
+
 /** @brief Returns the amount of links in the platform */
 size_t Engine::getLinkCount()
 {
   return simgrid::surf::LinkImpl::linksCount();
 }
+
 /** @brief Fills the passed list with all links found in the platform
  *
  *  @deprecated. Prefer Engine::getAllLinks() */
@@ -133,6 +169,7 @@ Engine::getLinkList(std::vector<Link*>* list)
 {
   simgrid::surf::LinkImpl::linksList(list);
 }
+
 /** @brief Returns the list of all links found in the platform */
 std::vector<Link*> Engine::getAllLinks()
 {
index a351ae4..5ce0f07 100644 (file)
@@ -4,6 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/msg.h"
+#include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/Storage.hpp"
 #include "simgrid/simix.hpp"
@@ -19,28 +20,32 @@ template class Extendable<simgrid::s4u::Storage>;
 
 namespace s4u {
 
-void getStorageList(std::map<std::string, Storage*>* whereTo)
+void XBT_ATTRIB_DEPRECATED_v322(
+    "simgrid::s4u::getStorageList() is deprecated in favor of Engine::getAllStorages(). Please switch before v3.22")
+    getStorageList(std::map<std::string, Storage*>* whereTo)
 {
-  for (auto const& s : *surf::StorageImpl::storagesMap())
-    whereTo->insert({s.first, &(s.second->piface_)}); // Convert each entry into its interface
+  for (auto const& s : simgrid::s4u::Engine::getInstance()->getAllStorages())
+    whereTo->insert({s->getName(), s});
+}
+
+Storage::Storage(std::string name, surf::StorageImpl* pimpl) : pimpl_(pimpl), name_(name)
+{
+  simgrid::s4u::Engine::getInstance()->addStorage(name, this);
 }
 
 Storage* Storage::byName(std::string name)
 {
-  surf::StorageImpl* res = surf::StorageImpl::byName(name);
-  if (res == nullptr)
-    return nullptr;
-  return &res->piface_;
+  return Engine::getInstance()->storageByNameOrNull(name);
 }
 
 const std::string& Storage::getName() const
 {
-  return pimpl_->getName();
+  return name_;
 }
 
 const char* Storage::getCname() const
 {
-  return pimpl_->getCname();
+  return name_.c_str();
 }
 
 const char* Storage::getType()
@@ -168,12 +173,10 @@ sg_storage_t sg_storage_get_by_name(const char* name)
  */
 xbt_dynar_t sg_storages_as_dynar()
 {
-  std::map<std::string, simgrid::s4u::Storage*>* storage_list = new std::map<std::string, simgrid::s4u::Storage*>;
-  simgrid::s4u::getStorageList(storage_list);
+  std::vector<simgrid::s4u::Storage*> storage_list = simgrid::s4u::Engine::getInstance()->getAllStorages();
   xbt_dynar_t res = xbt_dynar_new(sizeof(sg_storage_t), nullptr);
-  for (auto const& s : *storage_list)
-    xbt_dynar_push(res, &(s.second));
-  delete storage_list;
+  for (auto const& s : storage_list)
+    xbt_dynar_push(res, &s);
   return res;
 }
 
index 5552c33..1d218f1 100644 (file)
 #define _FLEXML_dax_H
 
 /* XML application entry points. */
-XBT_PUBLIC(void) STag_dax__adag(void);
-XBT_PUBLIC(void) ETag_dax__adag(void);
-XBT_PUBLIC(void) STag_dax__child(void);
-XBT_PUBLIC(void) ETag_dax__child(void);
-XBT_PUBLIC(void) STag_dax__job(void);
-XBT_PUBLIC(void) ETag_dax__job(void);
-XBT_PUBLIC(void) STag_dax__parent(void);
-XBT_PUBLIC(void) ETag_dax__parent(void);
-XBT_PUBLIC(void) STag_dax__uses(void);
-XBT_PUBLIC(void) ETag_dax__uses(void);
+XBT_PUBLIC void STag_dax__adag(void);
+XBT_PUBLIC void ETag_dax__adag(void);
+XBT_PUBLIC void STag_dax__child(void);
+XBT_PUBLIC void ETag_dax__child(void);
+XBT_PUBLIC void STag_dax__job(void);
+XBT_PUBLIC void ETag_dax__job(void);
+XBT_PUBLIC void STag_dax__parent(void);
+XBT_PUBLIC void ETag_dax__parent(void);
+XBT_PUBLIC void STag_dax__uses(void);
+XBT_PUBLIC void ETag_dax__uses(void);
 
 /* XML application data. */
 typedef int AT_dax__adag_childCount;
@@ -108,90 +108,90 @@ typedef int AT_dax__uses_type;
 #define AU_dax__uses_type NULL
 
 /* FleXML-provided data. */
-XBT_PUBLIC_DATA(int) dax__pcdata_ix;
-XBT_PUBLIC_DATA(char *) dax__bufferstack;
+XBT_PUBLIC_DATA int dax__pcdata_ix;
+XBT_PUBLIC_DATA char *dax__bufferstack;
 #define dax__pcdata (dax__bufferstack + dax__pcdata_ix)
-XBT_PUBLIC_DATA(AT_dax__adag_childCount) AX_dax__adag_childCount;
+XBT_PUBLIC_DATA AT_dax__adag_childCount AX_dax__adag_childCount;
 #define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
-XBT_PUBLIC_DATA(short int) dax__adag_childCount_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_count) AX_dax__adag_count;
+XBT_PUBLIC_DATA short int dax__adag_childCount_isset;
+XBT_PUBLIC_DATA AT_dax__adag_count AX_dax__adag_count;
 #define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
-XBT_PUBLIC_DATA(short int) dax__adag_count_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_fileCount) AX_dax__adag_fileCount;
+XBT_PUBLIC_DATA short int dax__adag_count_isset;
+XBT_PUBLIC_DATA AT_dax__adag_fileCount AX_dax__adag_fileCount;
 #define A_dax__adag_fileCount (dax__bufferstack + AX_dax__adag_fileCount)
-XBT_PUBLIC_DATA(short int) dax__adag_fileCount_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_index) AX_dax__adag_index;
+XBT_PUBLIC_DATA short int dax__adag_fileCount_isset;
+XBT_PUBLIC_DATA AT_dax__adag_index AX_dax__adag_index;
 #define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
-XBT_PUBLIC_DATA(short int) dax__adag_index_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_jobCount) AX_dax__adag_jobCount;
+XBT_PUBLIC_DATA short int dax__adag_index_isset;
+XBT_PUBLIC_DATA AT_dax__adag_jobCount AX_dax__adag_jobCount;
 #define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
-XBT_PUBLIC_DATA(short int) dax__adag_jobCount_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_name) AX_dax__adag_name;
+XBT_PUBLIC_DATA short int dax__adag_jobCount_isset;
+XBT_PUBLIC_DATA AT_dax__adag_name AX_dax__adag_name;
 #define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
-XBT_PUBLIC_DATA(short int) dax__adag_name_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_version) AX_dax__adag_version;
+XBT_PUBLIC_DATA short int dax__adag_name_isset;
+XBT_PUBLIC_DATA AT_dax__adag_version AX_dax__adag_version;
 #define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
-XBT_PUBLIC_DATA(short int) dax__adag_version_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_xmlns) AX_dax__adag_xmlns;
+XBT_PUBLIC_DATA short int dax__adag_version_isset;
+XBT_PUBLIC_DATA AT_dax__adag_xmlns AX_dax__adag_xmlns;
 #define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
-XBT_PUBLIC_DATA(short int) dax__adag_xmlns_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_xmlns_c_xsi) AX_dax__adag_xmlns_c_xsi;
+XBT_PUBLIC_DATA short int dax__adag_xmlns_isset;
+XBT_PUBLIC_DATA AT_dax__adag_xmlns_c_xsi AX_dax__adag_xmlns_c_xsi;
 #define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
-XBT_PUBLIC_DATA(short int) dax__adag_xmlns_c_xsi_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_xsi_c_schemaLocation) AX_dax__adag_xsi_c_schemaLocation;
+XBT_PUBLIC_DATA short int dax__adag_xmlns_c_xsi_isset;
+XBT_PUBLIC_DATA AT_dax__adag_xsi_c_schemaLocation AX_dax__adag_xsi_c_schemaLocation;
 #define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
-XBT_PUBLIC_DATA(short int) dax__adag_xsi_c_schemaLocation_isset;
-XBT_PUBLIC_DATA(AT_dax__child_ref) AX_dax__child_ref;
+XBT_PUBLIC_DATA short int dax__adag_xsi_c_schemaLocation_isset;
+XBT_PUBLIC_DATA AT_dax__child_ref AX_dax__child_ref;
 #define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
-XBT_PUBLIC_DATA(short int) dax__child_ref_isset;
-XBT_PUBLIC_DATA(AT_dax__job_id) AX_dax__job_id;
+XBT_PUBLIC_DATA short int dax__child_ref_isset;
+XBT_PUBLIC_DATA AT_dax__job_id AX_dax__job_id;
 #define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
-XBT_PUBLIC_DATA(short int) dax__job_id_isset;
-XBT_PUBLIC_DATA(AT_dax__job_level) AX_dax__job_level;
+XBT_PUBLIC_DATA short int dax__job_id_isset;
+XBT_PUBLIC_DATA AT_dax__job_level AX_dax__job_level;
 #define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
-XBT_PUBLIC_DATA(short int) dax__job_level_isset;
-XBT_PUBLIC_DATA(AT_dax__job_name) AX_dax__job_name;
+XBT_PUBLIC_DATA short int dax__job_level_isset;
+XBT_PUBLIC_DATA AT_dax__job_name AX_dax__job_name;
 #define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
-XBT_PUBLIC_DATA(short int) dax__job_name_isset;
-XBT_PUBLIC_DATA(AT_dax__job_namespace) AX_dax__job_namespace;
+XBT_PUBLIC_DATA short int dax__job_name_isset;
+XBT_PUBLIC_DATA AT_dax__job_namespace AX_dax__job_namespace;
 #define A_dax__job_namespace (dax__bufferstack + AX_dax__job_namespace)
-XBT_PUBLIC_DATA(short int) dax__job_namespace_isset;
-XBT_PUBLIC_DATA(AT_dax__job_runtime) AX_dax__job_runtime;
+XBT_PUBLIC_DATA short int dax__job_namespace_isset;
+XBT_PUBLIC_DATA AT_dax__job_runtime AX_dax__job_runtime;
 #define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
-XBT_PUBLIC_DATA(short int) dax__job_runtime_isset;
-XBT_PUBLIC_DATA(AT_dax__job_version) AX_dax__job_version;
+XBT_PUBLIC_DATA short int dax__job_runtime_isset;
+XBT_PUBLIC_DATA AT_dax__job_version AX_dax__job_version;
 #define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
-XBT_PUBLIC_DATA(short int) dax__job_version_isset;
-XBT_PUBLIC_DATA(AT_dax__parent_ref) AX_dax__parent_ref;
+XBT_PUBLIC_DATA short int dax__job_version_isset;
+XBT_PUBLIC_DATA AT_dax__parent_ref AX_dax__parent_ref;
 #define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
-XBT_PUBLIC_DATA(short int) dax__parent_ref_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_file) AX_dax__uses_file;
+XBT_PUBLIC_DATA short int dax__parent_ref_isset;
+XBT_PUBLIC_DATA AT_dax__uses_file AX_dax__uses_file;
 #define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
-XBT_PUBLIC_DATA(short int) dax__uses_file_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_link) AX_dax__uses_link;
+XBT_PUBLIC_DATA short int dax__uses_file_isset;
+XBT_PUBLIC_DATA AT_dax__uses_link AX_dax__uses_link;
 #define A_dax__uses_link AX_dax__uses_link
-XBT_PUBLIC_DATA(short int) dax__uses_link_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_optional) AX_dax__uses_optional;
+XBT_PUBLIC_DATA short int dax__uses_link_isset;
+XBT_PUBLIC_DATA AT_dax__uses_optional AX_dax__uses_optional;
 #define A_dax__uses_optional AX_dax__uses_optional
-XBT_PUBLIC_DATA(short int) dax__uses_optional_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_register) AX_dax__uses_register;
+XBT_PUBLIC_DATA short int dax__uses_optional_isset;
+XBT_PUBLIC_DATA AT_dax__uses_register AX_dax__uses_register;
 #define A_dax__uses_register AX_dax__uses_register
-XBT_PUBLIC_DATA(short int) dax__uses_register_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_size) AX_dax__uses_size;
+XBT_PUBLIC_DATA short int dax__uses_register_isset;
+XBT_PUBLIC_DATA AT_dax__uses_size AX_dax__uses_size;
 #define A_dax__uses_size (dax__bufferstack + AX_dax__uses_size)
-XBT_PUBLIC_DATA(short int) dax__uses_size_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_transfer) AX_dax__uses_transfer;
+XBT_PUBLIC_DATA short int dax__uses_size_isset;
+XBT_PUBLIC_DATA AT_dax__uses_transfer AX_dax__uses_transfer;
 #define A_dax__uses_transfer AX_dax__uses_transfer
-XBT_PUBLIC_DATA(short int) dax__uses_transfer_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_type) AX_dax__uses_type;
+XBT_PUBLIC_DATA short int dax__uses_transfer_isset;
+XBT_PUBLIC_DATA AT_dax__uses_type AX_dax__uses_type;
 #define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
-XBT_PUBLIC_DATA(short int) dax__uses_type_isset;
+XBT_PUBLIC_DATA short int dax__uses_type_isset;
 
 /* XML application utilities. */
-XBT_PUBLIC(int) dax__element_context(int);
+XBT_PUBLIC int dax__element_context(int);
 
 /* XML processor entry point. */
-XBT_PUBLIC(int) yylex(void);
+XBT_PUBLIC int yylex(void);
 
 /* Flexml error handling function (useful only when -q flag passed to flexml) */
 const char * dax__parse_err_msg(void);
index d81ec61..b93d874 100644 (file)
@@ -462,7 +462,8 @@ void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
     return;
   }
 
-  XBT_DEBUG("Killing process %s@%s", process->getCname(), process->host->getCname());
+  XBT_DEBUG("Actor '%s'@%s is killing actor '%s'@%s", issuer->getCname(), issuer->host->getCname(), process->getCname(),
+            process->host->getCname());
 
   process->context->iwannadie = 1;
   process->blocked = 0;
@@ -574,21 +575,19 @@ void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const
 
 }
 
-void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid) {
-  SIMIX_process_killall(simcall->issuer, reset_pid);
+void simcall_HANDLER_process_killall(smx_simcall_t simcall)
+{
+  SIMIX_process_killall(simcall->issuer);
 }
 /**
  * \brief Kills all running processes.
  * \param issuer this one will not be killed
  */
-void SIMIX_process_killall(smx_actor_t issuer, int reset_pid)
+void SIMIX_process_killall(smx_actor_t issuer)
 {
   for (auto const& kv : simix_global->process_list)
     if (kv.second != issuer)
       SIMIX_process_kill(kv.second, issuer);
-
-  if (reset_pid > 0)
-    simix_process_maxpid = reset_pid;
 }
 
 void SIMIX_process_change_host(smx_actor_t actor, sg_host_t dest)
index fab1cea..ad51e8b 100644 (file)
@@ -140,7 +140,7 @@ XBT_PRIVATE smx_actor_t SIMIX_process_create(const char* name, std::function<voi
 
 XBT_PRIVATE void SIMIX_process_runall();
 XBT_PRIVATE void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer);
-XBT_PRIVATE void SIMIX_process_killall(smx_actor_t issuer, int reset_pid);
+XBT_PRIVATE void SIMIX_process_killall(smx_actor_t issuer);
 XBT_PRIVATE void SIMIX_process_cleanup(smx_actor_t arg);
 XBT_PRIVATE void SIMIX_process_empty_trash();
 XBT_PRIVATE void SIMIX_process_yield(smx_actor_t self);
index 61d57bc..9f692a5 100644 (file)
@@ -5,7 +5,7 @@
 /*                                                                            */
 /* This is somehow the "libc" of SimGrid                                      */
 
-/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.            */
+/* Copyright (c) 2010-2018. 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. */
@@ -180,9 +180,9 @@ e_smx_state_t simcall_execution_test(smx_activity_t execution)
  * \ingroup simix_process_management
  * \brief Kills all SIMIX processes.
  */
-void simcall_process_killall(int reset_pid)
+void simcall_process_killall()
 {
-  simcall_BODY_process_killall(reset_pid);
+  simcall_BODY_process_killall();
 }
 
 /**
@@ -259,7 +259,7 @@ void simcall_process_set_kill_time(smx_actor_t process, double kill_time)
  * \brief Add an on_exit function
  * Add an on_exit function which will be executed when the process exits/is killed.
  */
-XBT_PUBLIC(void) simcall_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void *data)
+XBT_PUBLIC void simcall_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data)
 {
   simcall_BODY_process_on_exit(process, fun, data);
 }
index 106e960..21f3be7 100644 (file)
  */
 
 #include "src/simix/popping_private.hpp"
-static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal<int>(simcall->args[0]);
-}
-static inline int simcall_process_killall__getraw__reset_pid(smx_simcall_t simcall)
-{
-  return simgrid::simix::unmarshal_raw<int>(simcall->args[0]);
-}
-static inline void simcall_process_killall__set__reset_pid(smx_simcall_t simcall, int arg)
-{
-  simgrid::simix::marshal<int>(simcall->args[0], arg);
-}
-
 static inline smx_actor_t simcall_process_cleanup__get__process(smx_simcall_t simcall)
 {
   return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
@@ -1399,7 +1386,7 @@ static inline void simcall_run_blocking__set__code(smx_simcall_t simcall, std::f
 
 /* The prototype of all simcall handlers, automatically generated for you */
 
-XBT_PRIVATE void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid);
+XBT_PRIVATE void simcall_HANDLER_process_killall(smx_simcall_t simcall);
 XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t process);
 XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout);
 XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
index 8bae553..f4638de 100644 (file)
@@ -36,11 +36,11 @@ inline static R simcall(e_smx_simcall_t call, T const&... t)
   return simgrid::simix::unmarshal<R>(self->simcall.result);
 }
 
-inline static void simcall_BODY_process_killall(int reset_pid)
+inline static void simcall_BODY_process_killall()
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
-    simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall, reset_pid);
-  return simcall<void, int>(SIMCALL_PROCESS_KILLALL, reset_pid);
+    simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall);
+  return simcall<void>(SIMCALL_PROCESS_KILLALL);
 }
 
 inline static void simcall_BODY_process_cleanup(smx_actor_t process)
index f24a394..568241c 100644 (file)
@@ -74,7 +74,7 @@ void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
     return;
   switch (simcall->call) {
 case SIMCALL_PROCESS_KILLALL:
-  simcall_HANDLER_process_killall(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]));
+  simcall_HANDLER_process_killall(simcall);
   SIMIX_simcall_answer(simcall);
   break;
 
index b7d4b5f..52ca2e7 100644 (file)
@@ -18,7 +18,7 @@
 extern "C" {
 
 /********************************* Simcalls *********************************/
-XBT_PUBLIC_DATA(const char*) simcall_names[]; /* Name of each simcall */
+XBT_PUBLIC_DATA const char* simcall_names[]; /* Name of each simcall */
 
 #include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
 
index 82fd939..00bcbac 100644 (file)
@@ -35,7 +35,7 @@
 # Last but not the least, you should declare the new simix call in
 # ./include/simgrid/simix.h (otherwise you will get a warning at compile time)
 
-void process_killall(int reset_pid);
+void process_killall();
 void process_cleanup(smx_actor_t process) [[nohandler]];
 void process_suspend(smx_actor_t process) [[block]];
 int  process_join(smx_actor_t process, double timeout) [[block]];
index adbd7e9..887a2fb 100644 (file)
@@ -176,7 +176,7 @@ namespace simix {
 
 simgrid::xbt::signal<void()> onDeadlock;
 
-XBT_PUBLIC(void) set_maestro(std::function<void()> code)
+XBT_PUBLIC void set_maestro(std::function<void()> code)
 {
   maestro_code = std::move(code);
 }
@@ -282,7 +282,7 @@ void SIMIX_clean()
 #endif
 
   /* Kill all processes (but maestro) */
-  SIMIX_process_killall(simix_global->maestro_process, 1);
+  SIMIX_process_killall(simix_global->maestro_process);
   SIMIX_context_runall();
   SIMIX_process_empty_trash();
 
@@ -339,9 +339,9 @@ double SIMIX_get_clock()
 /** Wake up all processes waiting for a Surf action to finish */
 static void SIMIX_wake_processes()
 {
-  simgrid::kernel::resource::Action* action;
-
   for (auto const& model : *all_existing_models) {
+    simgrid::kernel::resource::Action* action;
+
     XBT_DEBUG("Handling the processes whose action failed (if any)");
     while ((action = surf_model_extract_failed_action_set(model))) {
       XBT_DEBUG("   Handling Action %p",action);
@@ -661,12 +661,12 @@ void SIMIX_display_process_status()
       if (boost::dynamic_pointer_cast<simgrid::kernel::activity::IoImpl>(process->waiting_synchro) != nullptr)
         synchro_description = "I/O";
 
-      XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
+      XBT_INFO("Process %ld (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", process->pid,
                process->getCname(), process->host->getCname(), synchro_description, process->waiting_synchro.get(),
                process->waiting_synchro->name.c_str(), (int)process->waiting_synchro->state);
     }
     else {
-      XBT_INFO("Process %lu (%s@%s)", process->pid, process->getCname(), process->host->getCname());
+      XBT_INFO("Process %ld (%s@%s)", process->pid, process->getCname(), process->host->getCname());
     }
   }
 }
index 8bbb7ec..1dc37d7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -20,7 +20,7 @@ namespace simgrid {
 namespace simix {
 
 class Global {
-  friend XBT_PUBLIC(bool) simgrid::s4u::this_actor::isMaestro();
+  friend XBT_PUBLIC bool simgrid::s4u::this_actor::isMaestro();
 
 public:
   smx_context_factory_t context_factory = nullptr;
@@ -66,9 +66,9 @@ public:
 
 extern "C" {
 
-XBT_PUBLIC_DATA(std::unique_ptr<simgrid::simix::Global>) simix_global;
+XBT_PUBLIC_DATA std::unique_ptr<simgrid::simix::Global> simix_global;
 
-XBT_PUBLIC(void) SIMIX_clean();
+XBT_PUBLIC void SIMIX_clean();
 
 /******************************** Exceptions *********************************/
 /** @brief Ask to the provided ActorImpl to raise the provided exception */
index 6690dfc..82d2642 100644 (file)
@@ -396,10 +396,17 @@ int PMPI_Sendrecv(void* sendbuf, int sendcount, MPI_Datatype sendtype, int dst,
     retval = MPI_ERR_COMM;
   } else if (not sendtype->is_valid() || not recvtype->is_valid()) {
     retval = MPI_ERR_TYPE;
-  } else if (src == MPI_PROC_NULL || dst == MPI_PROC_NULL) {
-    simgrid::smpi::Status::empty(status);
-    status->MPI_SOURCE = MPI_PROC_NULL;
-    retval             = MPI_SUCCESS;
+  } else if (src == MPI_PROC_NULL) {
+    if(status!=MPI_STATUS_IGNORE){
+      simgrid::smpi::Status::empty(status);
+      status->MPI_SOURCE = MPI_PROC_NULL;
+    }
+    if(dst != MPI_PROC_NULL)
+      simgrid::smpi::Request::send(sendbuf, sendcount, sendtype, dst, sendtag, comm);
+    retval = MPI_SUCCESS;
+  }else if (dst == MPI_PROC_NULL){
+    simgrid::smpi::Request::recv(recvbuf, recvcount, recvtype, src, recvtag, comm, status);
+    retval = MPI_SUCCESS;
   }else if (dst >= comm->group()->size() || dst <0 ||
       (src!=MPI_ANY_SOURCE && (src >= comm->group()->size() || src <0))){
     retval = MPI_ERR_RANK;
index 24cdf97..60f251c 100644 (file)
@@ -2,7 +2,7 @@
 /* This is the tuning used by MVAPICH for Stampede platform based on (MV2_ARCH_INTEL_XEON_E5_2680_16,
  * MV2_HCA_MLX_CX_FDR) */
 
-/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2018. 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. */
@@ -16,7 +16,7 @@
 
 #define MV2_MAX_NB_THRESHOLDS 32
 
-XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
+XBT_PUBLIC void smpi_coll_cleanup_mvapich2(void);
 
 struct mv2_alltoall_tuning_element {
   int min;
index 09594c2..ad5ae02 100644 (file)
@@ -432,7 +432,7 @@ extern std::unordered_map<std::string, double> location2speedup;
 
 /** @brief Returns the last call location (filename, linenumber). Process-specific. */
 extern "C" {
-XBT_PUBLIC(smpi_trace_call_location_t*) smpi_trace_get_call_location();
+XBT_PUBLIC smpi_trace_call_location_t* smpi_trace_get_call_location();
 }
 
 enum smpi_priv_strategies {
index 99a7377..9dfb2e3 100644 (file)
@@ -1,5 +1,5 @@
 /*High level handling of collective algorithms*/
-/* Copyright (c) 2009-2010, 2012-2017. The SimGrid Team.
+/* Copyright (c) 2009-2010, 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -90,8 +90,8 @@ struct s_mpi_coll_description_t {
 
 class Colls{
   public:
-    static XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table);
-    static XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t* table, std::string name, const char* desc);
+    static XBT_PUBLIC void coll_help(const char* category, s_mpi_coll_description_t* table);
+    static XBT_PUBLIC int find_coll_description(s_mpi_coll_description_t* table, std::string name, const char* desc);
     static void set_collectives();
 
     // for each collective type, create the set_* prototype, the description array and the function pointer
index 038a40b..dca417d 100644 (file)
@@ -19,6 +19,6 @@ struct s_smpi_factor_t {
 };
 }
 
-XBT_PUBLIC(std::vector<s_smpi_factor_t>) parse_factor(std::string smpi_coef_string);
+XBT_PUBLIC std::vector<s_smpi_factor_t> parse_factor(std::string smpi_coef_string);
 
 #endif
index d13557d..fd3309b 100644 (file)
@@ -206,13 +206,6 @@ void TRACE_smpi_computing_out(int rank)
     smpi_container(rank)->getState("MPI_STATE")->popEvent();
 }
 
-void TRACE_smpi_sleeping_init(int rank) // FIXME: this function is never called
-{
-  //first use, initialize the color in the trace
-  if (TRACE_smpi_is_enabled() && TRACE_smpi_is_sleeping())
-    smpi_container(rank)->getState("MPI_STATE")->addEntityValue("sleeping", instr_find_color("sleeping"));
-}
-
 void TRACE_smpi_sleeping_in(int rank, double duration)
 {
   if (TRACE_smpi_is_enabled() && TRACE_smpi_is_sleeping())
index 96b3818..d0ccc26 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2009-2017. The SimGrid Team. All rights reserved.    */
+/* Copyright (c) 2007, 2009-2018. 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. */
@@ -30,13 +30,13 @@ double smpi_host_speed;
 shared_malloc_type smpi_cfg_shared_malloc = shmalloc_global;
 double smpi_total_benched_time = 0;
 
-extern "C" XBT_PUBLIC(void) smpi_execute_flops_(double *flops);
+extern "C" XBT_PUBLIC void smpi_execute_flops_(double* flops);
 void smpi_execute_flops_(double *flops)
 {
   smpi_execute_flops(*flops);
 }
 
-extern "C" XBT_PUBLIC(void) smpi_execute_(double *duration);
+extern "C" XBT_PUBLIC void smpi_execute_(double* duration);
 void smpi_execute_(double *duration)
 {
   smpi_execute(*duration);
index 2d0ffd2..8fe3b4e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2013-2018. 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. */
@@ -87,31 +87,31 @@ struct doublecomplex {
   doublereal i;
 };
 
-extern "C" XBT_PUBLIC(doublereal) smpi_get_host_power_peak_at_(integer *pstate_index);
+extern "C" XBT_PUBLIC doublereal smpi_get_host_power_peak_at_(integer* pstate_index);
 doublereal smpi_get_host_power_peak_at_(integer *pstate_index)
 {
   return static_cast<doublereal>(smpi_get_host_power_peak_at((int)*pstate_index));
 }
 
-extern "C" XBT_PUBLIC(doublereal) smpi_get_host_current_power_peak_();
+extern "C" XBT_PUBLIC doublereal smpi_get_host_current_power_peak_();
 doublereal smpi_get_host_current_power_peak_()
 {
   return smpi_get_host_current_power_peak();
 }
 
-extern "C" XBT_PUBLIC(integer) smpi_get_host_nb_pstates_();
+extern "C" XBT_PUBLIC integer smpi_get_host_nb_pstates_();
 integer smpi_get_host_nb_pstates_()
 {
   return static_cast<integer>(smpi_get_host_nb_pstates());
 }
 
-extern "C" XBT_PUBLIC(void) smpi_set_host_pstate_(integer *pstate_index);
+extern "C" XBT_PUBLIC void smpi_set_host_pstate_(integer* pstate_index);
 void smpi_set_host_pstate_(integer *pstate_index)
 {
   smpi_set_host_pstate(static_cast<int>(*pstate_index));
 }
 
-extern "C" XBT_PUBLIC(doublereal) smpi_get_host_consumed_energy_();
+extern "C" XBT_PUBLIC doublereal smpi_get_host_consumed_energy_();
 doublereal smpi_get_host_consumed_energy_()
 {
   return static_cast<doublereal>(smpi_get_host_consumed_energy());
index 1d677e5..2e173de 100644 (file)
@@ -81,14 +81,14 @@ void Process::set_data(int* argc, char*** argv)
   argv_ = argv;
   // set the process attached to the mailbox
   mailbox_small_->setReceiver(process_);
-  XBT_DEBUG("<%lu> SMPI process has been initialized: %p", process_->getPid(), process_.get());
+  XBT_DEBUG("<%ld> SMPI process has been initialized: %p", process_->getPid(), process_.get());
 }
 
 /** @brief Prepares the current process for termination. */
 void Process::finalize()
 {
   state_ = SMPI_FINALIZED;
-  XBT_DEBUG("<%lu> Process left the game", process_->getPid());
+  XBT_DEBUG("<%ld> Process left the game", process_->getPid());
 
   // This leads to an explosion of the search graph which cannot be reduced:
   if(MC_is_active() || MC_record_replay_is_active())
index 9bf2045..b4f18eb 100644 (file)
@@ -218,7 +218,7 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
                                 "to allow big allocations.\n",
              size >> 20);
   if(use_huge_page)
-    mem = (void*)ALIGN_UP((uint64_t)allocated_ptr, HUGE_PAGE_SIZE);
+    mem = (void*)ALIGN_UP((int64_t)allocated_ptr, HUGE_PAGE_SIZE);
   else
     mem = allocated_ptr;
 
@@ -269,8 +269,8 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
     if(i_block < nb_shared_blocks-1)
       xbt_assert(stop_offset < shared_block_offsets[2*i_block+2],
               "stop_offset (%zu) should be lower than its successor start offset (%zu)", stop_offset, shared_block_offsets[2*i_block+2]);
-    size_t start_block_offset = ALIGN_UP(start_offset, smpi_shared_malloc_blocksize);
-    size_t stop_block_offset = ALIGN_DOWN(stop_offset, smpi_shared_malloc_blocksize);
+    size_t start_block_offset = ALIGN_UP((int64_t)start_offset, smpi_shared_malloc_blocksize);
+    size_t stop_block_offset = ALIGN_DOWN((int64_t)stop_offset, smpi_shared_malloc_blocksize);
     for (size_t offset = start_block_offset; offset < stop_block_offset; offset += smpi_shared_malloc_blocksize) {
       XBT_DEBUG("\t\tglobal shared allocation, mmap block offset %zx", offset);
       void* pos = (void*)((unsigned long)mem + offset);
@@ -283,8 +283,8 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
                              "and that the directory you are passing is mounted correctly (mount /path/to/huge -t hugetlbfs -o rw,mode=0777).",
                  strerror(errno));
     }
-    size_t low_page_start_offset = ALIGN_UP(start_offset, PAGE_SIZE);
-    size_t low_page_stop_offset = start_block_offset < ALIGN_DOWN(stop_offset, PAGE_SIZE) ? start_block_offset : ALIGN_DOWN(stop_offset, PAGE_SIZE);
+    size_t low_page_start_offset = ALIGN_UP((int64_t)start_offset, PAGE_SIZE);
+    size_t low_page_stop_offset = (int64_t)start_block_offset < ALIGN_DOWN((int64_t)stop_offset, PAGE_SIZE) ? start_block_offset : ALIGN_DOWN((int64_t)stop_offset, (int64_t)PAGE_SIZE);
     if(low_page_start_offset < low_page_stop_offset) {
       XBT_DEBUG("\t\tglobal shared allocation, mmap block start");
       void* pos = (void*)((unsigned long)mem + low_page_start_offset);
@@ -297,7 +297,7 @@ void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int
     }
     if(low_page_stop_offset <= stop_block_offset) {
       XBT_DEBUG("\t\tglobal shared allocation, mmap block stop");
-      size_t high_page_stop_offset = stop_offset == size ? size : ALIGN_DOWN(stop_offset, PAGE_SIZE);
+      size_t high_page_stop_offset = stop_offset == size ? size : ALIGN_DOWN((int64_t)stop_offset, PAGE_SIZE);
       if(high_page_stop_offset > stop_block_offset) {
         void* pos = (void*)((unsigned long)mem + stop_block_offset);
         void* res = mmap(pos, high_page_stop_offset-stop_block_offset, PROT_READ | PROT_WRITE, mmap_base_flag, // not a full huge page
index e363973..1bc9a7f 100644 (file)
@@ -39,7 +39,7 @@ char* F2C::get_key(char* key, int id) {
 }
 
 char* F2C::get_key_id(char* key, int id) {
-  std::snprintf(key, KEY_SIZE, "%x_%lu", static_cast<unsigned>(id), simgrid::s4u::Actor::self()->getPid());
+  std::snprintf(key, KEY_SIZE, "%x_%ld", static_cast<unsigned>(id), simgrid::s4u::Actor::self()->getPid());
   return key;
 }
 
index aba390c..c961ef2 100644 (file)
@@ -306,7 +306,7 @@ void Request::sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,int d
 {
   MPI_Request requests[2];
   MPI_Status stats[2];
-  unsigned int myid = simgrid::s4u::Actor::self()->getPid();
+  int myid = simgrid::s4u::Actor::self()->getPid();
   if ((comm->group()->actor(dst)->getPid() == myid) && (comm->group()->actor(src)->getPid() == myid)){
       Datatype::copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype);
       if(status !=MPI_STATUS_IGNORE){
index 632ec37..3325fd3 100644 (file)
@@ -18,7 +18,7 @@
  * Tools *
  *********/
 
-XBT_PUBLIC_DATA(simgrid::surf::HostModel*) surf_host_model;
+XBT_PUBLIC_DATA simgrid::surf::HostModel* surf_host_model;
 
 /*********
  * Model *
index fcfa534..a11e477 100644 (file)
@@ -4,6 +4,8 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "StorageImpl.hpp"
+#include "simgrid/s4u/Engine.hpp"
+#include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
 #include "surf_private.hpp"
 
@@ -24,17 +26,6 @@ simgrid::xbt::signal<void(StorageImpl*, int, int)> storageStateChangedCallbacks;
 simgrid::xbt::signal<void(StorageAction*, kernel::resource::Action::State, kernel::resource::Action::State)>
     storageActionStateChangedCallbacks;
 
-/* List of storages */
-std::unordered_map<std::string, StorageImpl*>* StorageImpl::storages =
-    new std::unordered_map<std::string, StorageImpl*>();
-
-StorageImpl* StorageImpl::byName(std::string name)
-{
-  if (storages->find(name) == storages->end())
-    return nullptr;
-  return storages->at(name);
-}
-
 /*********
  * Model *
  *********/
@@ -57,7 +48,7 @@ StorageImpl::StorageImpl(kernel::resource::Model* model, std::string name, lmm_s
                          double bwrite, std::string type_id, std::string content_name, sg_size_t size,
                          std::string attach)
     : Resource(model, name.c_str(), maxminSystem->constraint_new(this, std::max(bread, bwrite)))
-    , piface_(this)
+    , piface_(name, this)
     , typeId_(type_id)
     , content_name(content_name)
     , size_(size)
@@ -67,7 +58,6 @@ StorageImpl::StorageImpl(kernel::resource::Model* model, std::string name, lmm_s
   XBT_DEBUG("Create resource with Bread '%f' Bwrite '%f' and Size '%llu'", bread, bwrite, size);
   constraintRead_  = maxminSystem->constraint_new(this, bread);
   constraintWrite_ = maxminSystem->constraint_new(this, bwrite);
-  storages->insert({name, this});
 }
 
 StorageImpl::~StorageImpl()
@@ -75,7 +65,6 @@ StorageImpl::~StorageImpl()
   storageDestructedCallbacks(this);
 }
 
-
 bool StorageImpl::isUsed()
 {
   THROW_UNIMPLEMENTED;
index ff0704a..6575a18 100644 (file)
@@ -35,29 +35,29 @@ class StorageAction;
  * @brief Callbacks handler which emit the callbacks after Storage creation *
  * @details Callback functions have the following signature: `void(Storage*)`
  */
-XBT_PUBLIC_DATA(simgrid::xbt::signal<void(StorageImpl*)>) storageCreatedCallbacks;
+XBT_PUBLIC_DATA simgrid::xbt::signal<void(StorageImpl*)> storageCreatedCallbacks;
 
 /** @ingroup SURF_callbacks
  * @brief Callbacks handler which emit the callbacks after Storage destruction *
  * @details Callback functions have the following signature: `void(StoragePtr)`
  */
-XBT_PUBLIC_DATA(simgrid::xbt::signal<void(StorageImpl*)>) storageDestructedCallbacks;
+XBT_PUBLIC_DATA simgrid::xbt::signal<void(StorageImpl*)> storageDestructedCallbacks;
 
 /** @ingroup SURF_callbacks
  * @brief Callbacks handler which emit the callbacks after Storage State changed *
  * @details Callback functions have the following signature: `void(StorageAction *action, int previouslyOn, int
  * currentlyOn)`
  */
-XBT_PUBLIC_DATA(simgrid::xbt::signal<void(StorageImpl*, int, int)>) storageStateChangedCallbacks;
+XBT_PUBLIC_DATA simgrid::xbt::signal<void(StorageImpl*, int, int)> storageStateChangedCallbacks;
 
 /** @ingroup SURF_callbacks
  * @brief Callbacks handler which emit the callbacks after StorageAction State changed *
  * @details Callback functions have the following signature: `void(StorageAction *action,
  * simgrid::kernel::resource::Action::State old, simgrid::kernel::resource::Action::State current)`
  */
-XBT_PUBLIC_DATA(
-    simgrid::xbt::signal<void(StorageAction*, kernel::resource::Action::State, kernel::resource::Action::State)>)
-storageActionStateChangedCallbacks;
+XBT_PUBLIC_DATA
+simgrid::xbt::signal<void(StorageAction*, kernel::resource::Action::State, kernel::resource::Action::State)>
+    storageActionStateChangedCallbacks;
 
 /*********
  * Model *
@@ -73,8 +73,6 @@ public:
 
   virtual StorageImpl* createStorage(std::string id, std::string type_id, std::string content_name,
                                      std::string attach) = 0;
-
-  std::vector<StorageImpl*> p_storageList;
 };
 
 /************
@@ -94,7 +92,6 @@ public:
 
   /** @brief Public interface */
   s4u::Storage piface_;
-  static StorageImpl* byName(std::string name);
 
   /** @brief Check if the Storage is used (if an action currently uses its resources) */
   bool isUsed() override;
@@ -121,8 +118,6 @@ public:
   virtual StorageAction* write(sg_size_t size) = 0;
   virtual std::string getHost() { return attach_; }
 
-  static std::unordered_map<std::string, StorageImpl*>* storagesMap() { return StorageImpl::storages; }
-
   kernel::lmm::Constraint* constraintWrite_; /* Constraint for maximum write bandwidth*/
   kernel::lmm::Constraint* constraintRead_;  /* Constraint for maximum write bandwidth*/
 
@@ -131,7 +126,6 @@ public:
   sg_size_t size_;          // Only used at parsing time then goes to the FileSystemExtension
 
 private:
-  static std::unordered_map<std::string, StorageImpl*>* storages;
   // Name of the host to which this storage is attached. Only used at platform parsing time, then the interface stores
   // the Host directly.
   std::string attach_;
index bc04a19..47ad57f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -24,8 +24,7 @@ namespace surf {
  * @brief SURF cpu model interface class
  * @details A model is an object which handle the interactions between its Resources and its Actions
  */
-XBT_PUBLIC_CLASS CpuModel : public kernel::resource::Model
-{
+class XBT_PUBLIC CpuModel : public kernel::resource::Model {
 public:
   /**
    * @brief Create a Cpu
@@ -48,8 +47,7 @@ public:
 * @brief SURF cpu resource interface class
 * @details A Cpu represent a cpu associated to a host
 */
-XBT_PUBLIC_CLASS Cpu : public simgrid::kernel::resource::Resource
-{
+class XBT_PUBLIC Cpu : public simgrid::kernel::resource::Resource {
 public:
   /**
    * @brief Cpu constructor
@@ -91,11 +89,7 @@ public:
    * @param requestedCores The desired amount of cores. Must be >= 1
    * @return The CpuAction corresponding to the processing
    */
-  virtual simgrid::kernel::resource::Action* execution_start(double size, int requestedCores)
-  {
-    THROW_UNIMPLEMENTED;
-    return nullptr;
-  }
+  virtual simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) = 0;
 
   /**
    * @brief Make a process sleep for duration (in seconds)
@@ -148,9 +142,8 @@ public:
  /** @ingroup SURF_cpu_interface
  * @brief A CpuAction represents the execution of code on one or several Cpus
  */
-XBT_PUBLIC_CLASS CpuAction : public simgrid::kernel::resource::Action
-{
-  friend XBT_PUBLIC(Cpu*) getActionCpu(CpuAction* action);
+class XBT_PUBLIC CpuAction : public simgrid::kernel::resource::Action {
+  friend XBT_PUBLIC Cpu* getActionCpu(CpuAction * action);
 
 public:
   /** @brief Signal emitted when the action state changes (ready/running/done, etc)
index 2f29bda..5ce1af9 100644 (file)
@@ -117,6 +117,11 @@ public:
 
   bool isUsed() override;
   CpuAction *execution_start(double size) override;
+  simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override
+  {
+    THROW_UNIMPLEMENTED;
+    return nullptr;
+  }
   CpuAction *sleep(double duration) override;
   double getAvailableSpeed() override;
 
index 602f0b9..edb6fc7 100644 (file)
@@ -28,11 +28,11 @@ public:
   ns3::Ptr<ns3::Node> ns3Node_;
 };
 
-XBT_PUBLIC(void) ns3_initialize(std::string TcpProtocol);
+XBT_PUBLIC void ns3_initialize(std::string TcpProtocol);
 extern "C" {
-XBT_PUBLIC(void) ns3_simulator(double maxSeconds);
-XBT_PUBLIC(void) ns3_add_link(NetPointNs3* src, NetPointNs3* dst, double bw, double lat);
-XBT_PUBLIC(void) ns3_add_cluster(const char* id, double bw, double lat);
+XBT_PUBLIC void ns3_simulator(double maxSeconds);
+XBT_PUBLIC void ns3_add_link(NetPointNs3* src, NetPointNs3* dst, double bw, double lat);
+XBT_PUBLIC void ns3_add_cluster(const char* id, double bw, double lat);
 }
 
 class XBT_PRIVATE SgFlow {
index aff7964..b783d55 100644 (file)
@@ -76,6 +76,11 @@ public:
   bool isUsed() override;
   void apply_event(tmgr_trace_event_t event, double value) override;
   kernel::resource::Action* execution_start(double size) override;
+  simgrid::kernel::resource::Action* execution_start(double size, int requestedCores) override
+  {
+    THROW_UNIMPLEMENTED;
+    return nullptr;
+  }
   kernel::resource::Action* sleep(double duration) override;
 
 protected:
index c542476..da184ba 100644 (file)
@@ -394,7 +394,7 @@ void sg_platf_new_mount(MountCreationArgs* mount)
 
   if (mount_list.empty())
     XBT_DEBUG("Create a Mount list for %s", A_surfxml_host_id);
-  mount_list.insert({mount->name, simgrid::surf::StorageImpl::byName(mount->storageId.c_str())});
+  mount_list.insert({mount->name, simgrid::s4u::Engine::getInstance()->storageByName(mount->storageId)->getImpl()});
 }
 
 void sg_platf_new_route(RouteCreationArgs* route)
index 62e7d21..10fac18 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "storage_n11.hpp"
 #include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
 #include "src/kernel/lmm/maxmin.hpp"
 #include "src/kernel/routing/NetPoint.hpp"
 #include "xbt/utility.hpp"
@@ -19,13 +20,13 @@ extern std::map<std::string, simgrid::surf::StorageType*> storage_types;
 
 static void check_disk_attachment()
 {
-  for (auto const& s : *simgrid::surf::StorageImpl::storagesMap()) {
-    simgrid::kernel::routing::NetPoint* host_elm = sg_netpoint_by_name_or_null(s.second->getHost().c_str());
+  for (auto const& s : simgrid::s4u::Engine::getInstance()->getAllStorages()) {
+    simgrid::kernel::routing::NetPoint* host_elm = sg_netpoint_by_name_or_null(s->getImpl()->getHost().c_str());
     if (not host_elm)
-      surf_parse_error(std::string("Unable to attach storage ") + s.second->getCname() + ": host " +
-                       s.second->getHost() + " does not exist.");
+      surf_parse_error(std::string("Unable to attach storage ") + s->getCname() + ": host " +
+                       s->getImpl()->getHost().c_str() + " does not exist.");
     else
-      s.second->piface_.attached_to_ = sg_host_by_name(s.second->getHost().c_str());
+      s->attached_to_ = sg_host_by_name(s->getImpl()->getHost().c_str());
   }
 }
 
@@ -65,8 +66,6 @@ StorageImpl* StorageN11Model::createStorage(std::string id, std::string type_id,
   XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tBread '%f'\n", id.c_str(), type_id.c_str(),
             Bread);
 
-  p_storageList.push_back(storage);
-
   return storage;
 }
 
index f45907e..54f61e8 100644 (file)
@@ -329,9 +329,6 @@ void surf_exit()
     delete stype->model_properties;
     delete stype;
   }
-  for (auto const& s : *simgrid::surf::StorageImpl::storagesMap())
-    delete s.second;
-  delete simgrid::surf::StorageImpl::storagesMap();
 
   for (auto const& model : *all_existing_models)
     delete model;
index 385a234..24aa95f 100644 (file)
@@ -28,9 +28,9 @@
  *********/
 
 /* user-visible parameters */
-XBT_PUBLIC_DATA(double) sg_maxmin_precision;
-XBT_PUBLIC_DATA(double) sg_surf_precision;
-XBT_PUBLIC_DATA(int) sg_concurrency_limit;
+XBT_PUBLIC_DATA double sg_maxmin_precision;
+XBT_PUBLIC_DATA double sg_surf_precision;
+XBT_PUBLIC_DATA int sg_concurrency_limit;
 
 extern XBT_PRIVATE double sg_tcp_gamma;
 extern XBT_PRIVATE double sg_latency_factor;
@@ -64,12 +64,12 @@ static inline int double_equals(double value1, double value2, double precision)
 }
 
 extern "C" {
-XBT_PUBLIC(double) surf_get_clock();
+XBT_PUBLIC double surf_get_clock();
 }
 /** \ingroup SURF_simulation
  *  \brief List of hosts that have just restarted and whose autorestart process should be restarted.
  */
-XBT_PUBLIC_DATA(std::vector<sg_host_t>) host_that_restart;
+XBT_PUBLIC_DATA std::vector<sg_host_t> host_that_restart;
 
 int XBT_PRIVATE __surf_is_absolute_file_path(const char *file_path);
 
@@ -80,6 +80,6 @@ int XBT_PRIVATE __surf_is_absolute_file_path(const char *file_path);
 /** \ingroup SURF_models
  *  \brief List of initialized models
  */
-XBT_PUBLIC_DATA(std::vector<simgrid::kernel::resource::Model*>*) all_existing_models;
+XBT_PUBLIC_DATA std::vector<simgrid::kernel::resource::Model*>* all_existing_models;
 
 #endif /* SURF_MODEL_H_ */
index 1d460ff..b1f9e7c 100644 (file)
@@ -38,7 +38,7 @@ XBT_PRIVATE int __surf_is_absolute_file_path(const char* file_path);
 
 extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set* future_evt_set;
 
-XBT_PUBLIC(void) storage_register_callbacks();
+XBT_PUBLIC void storage_register_callbacks();
 
 XBT_PRIVATE void parse_after_config();
 
index 36ce190..28cf319 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. 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. */
@@ -29,12 +29,12 @@ typedef s_tmgr_trace_event_t* tmgr_trace_event_t;
  * This flag indicates whether the structure is still used somewhere or not.
  * When the structure is freed, the argument is set to nullptr
 */
-XBT_PUBLIC(void) tmgr_trace_event_unref(tmgr_trace_event_t* trace_event);
+XBT_PUBLIC void tmgr_trace_event_unref(tmgr_trace_event_t* trace_event);
 
-XBT_PUBLIC(void) tmgr_finalize();
+XBT_PUBLIC void tmgr_finalize();
 
-XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_file(std::string filename);
-XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_string(std::string id, std::string input, double periodicity);
+XBT_PUBLIC tmgr_trace_t tmgr_trace_new_from_file(std::string filename);
+XBT_PUBLIC tmgr_trace_t tmgr_trace_new_from_string(std::string id, std::string input, double periodicity);
 }
 
 namespace simgrid {
@@ -49,8 +49,7 @@ namespace simgrid {
  * - #future_evt_set: makes it easy to find the next occuring event of all traces
  */
 namespace trace_mgr {
-XBT_PUBLIC_CLASS DatedValue
-{
+class XBT_PUBLIC DatedValue {
 public:
   double date_          = 0;
   double value_         = 0;
@@ -62,8 +61,7 @@ public:
 std::ostream& operator<<(std::ostream& out, const DatedValue& e);
 
 /** @brief A trace_iterator links a trace to a resource */
-XBT_PUBLIC_CLASS trace_event{
-
+class XBT_PUBLIC trace_event {
 };
 
 /** @brief A trace is a set of timed values, encoding the value that a variable takes at what time *
@@ -71,7 +69,7 @@ XBT_PUBLIC_CLASS trace_event{
  * It is useful to model dynamic platforms, where an external load that makes the resource availability change over time.
  * To model that, you have to set several traces per resource: one for the on/off state and one for each numerical value (computational speed, bandwidth and latency).
  */
-XBT_PUBLIC_CLASS trace {
+class XBT_PUBLIC trace {
 public:
   /**  Creates an empty trace */
   explicit trace();
@@ -82,7 +80,7 @@ public:
 
 /** @brief Future Event Set (collection of iterators over the traces)
  * That's useful to quickly know which is the next occurring event in a set of traces. */
-XBT_PUBLIC_CLASS future_evt_set {
+class XBT_PUBLIC future_evt_set {
 public:
   future_evt_set();
   virtual ~future_evt_set();
index 7b1c5b4..c30139c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2018. 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. */
 extern "C" {
 
 /* Module management functions */
-XBT_PUBLIC(void) sg_platf_init();;
-XBT_PUBLIC(void) sg_platf_exit();
-
-XBT_PUBLIC(void) surf_parse_open(const char *file);
-XBT_PUBLIC(void) surf_parse_close();
-XBT_PUBLIC(void) surf_parse_assert(bool cond, std::string msg);
-XBT_ATTRIB_NORETURN XBT_PUBLIC(void) surf_parse_error(std::string msg);
-XBT_PUBLIC(void) surf_parse_assert_netpoint(std::string hostname, std::string pre, std::string post);
-
-XBT_PUBLIC(double) surf_parse_get_double(std::string s);
-XBT_PUBLIC(int) surf_parse_get_int(std::string s);
-XBT_PUBLIC(double) surf_parse_get_time(const char* string, const char* entity_kind, std::string name);
-XBT_PUBLIC(double) surf_parse_get_size(const char* string, const char* entity_kind, std::string name);
-XBT_PUBLIC(double) surf_parse_get_bandwidth(const char* string, const char* entity_kind, std::string name);
-XBT_PUBLIC(double) surf_parse_get_speed(const char* string, const char* entity_kind, std::string name);
-
-XBT_PUBLIC(int) surf_parse(); /* Entry-point to the parser */
+XBT_PUBLIC void sg_platf_init();
+XBT_PUBLIC void sg_platf_exit();
+
+XBT_PUBLIC void surf_parse_open(const char* file);
+XBT_PUBLIC void surf_parse_close();
+XBT_PUBLIC void surf_parse_assert(bool cond, std::string msg);
+XBT_ATTRIB_NORETURN XBT_PUBLIC void surf_parse_error(std::string msg);
+XBT_PUBLIC void surf_parse_assert_netpoint(std::string hostname, std::string pre, std::string post);
+
+XBT_PUBLIC double surf_parse_get_double(std::string s);
+XBT_PUBLIC int surf_parse_get_int(std::string s);
+XBT_PUBLIC double surf_parse_get_time(const char* string, const char* entity_kind, std::string name);
+XBT_PUBLIC double surf_parse_get_size(const char* string, const char* entity_kind, std::string name);
+XBT_PUBLIC double surf_parse_get_bandwidth(const char* string, const char* entity_kind, std::string name);
+XBT_PUBLIC double surf_parse_get_speed(const char* string, const char* entity_kind, std::string name);
+
+XBT_PUBLIC int surf_parse(); /* Entry-point to the parser */
 }
 
 #endif
index 2a62c6d..456a10a 100644 (file)
@@ -1,6 +1,6 @@
 /* platf_private.h - Interface to the SimGrid platforms which visibility should be limited to this directory */
 
-/* Copyright (c) 2004-2017. The SimGrid Team.
+/* Copyright (c) 2004-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -187,46 +187,46 @@ public:
 void routing_cluster_add_backbone(simgrid::surf::LinkImpl* bb);
 /*** END of the parsing cruft ***/
 
-XBT_PUBLIC(void) sg_platf_begin();  // Start a new platform
-XBT_PUBLIC(void) sg_platf_end(); // Finish the creation of the platform
+XBT_PUBLIC void sg_platf_begin(); // Start a new platform
+XBT_PUBLIC void sg_platf_end();   // Finish the creation of the platform
 
-XBT_PUBLIC(simgrid::s4u::NetZone*) sg_platf_new_Zone_begin(ZoneCreationArgs* zone); // Begin description of new Zone
-XBT_PUBLIC(void) sg_platf_new_Zone_seal();                                          // That Zone is fully described
+XBT_PUBLIC simgrid::s4u::NetZone* sg_platf_new_Zone_begin(ZoneCreationArgs* zone); // Begin description of new Zone
+XBT_PUBLIC void sg_platf_new_Zone_seal();                                          // That Zone is fully described
 
-XBT_PUBLIC(void) sg_platf_new_host(sg_platf_host_cbarg_t host);        // Add a host      to the current Zone
-XBT_PUBLIC(void) sg_platf_new_hostlink(HostLinkCreationArgs* h);       // Add a host_link to the current Zone
-XBT_PUBLIC(void) sg_platf_new_link(LinkCreationArgs* link);            // Add a link      to the current Zone
-XBT_PUBLIC(void) sg_platf_new_peer(PeerCreationArgs* peer);            // Add a peer      to the current Zone
-XBT_PUBLIC(void) sg_platf_new_cluster(ClusterCreationArgs* clust);     // Add a cluster   to the current Zone
-XBT_PUBLIC(void) sg_platf_new_cabinet(CabinetCreationArgs* cabinet);   // Add a cabinet   to the current Zone
-XBT_PUBLIC(simgrid::kernel::routing::NetPoint*)                        // Add a router    to the current Zone
-sg_platf_new_router(std::string, const char* coords);
+XBT_PUBLIC void sg_platf_new_host(sg_platf_host_cbarg_t host);      // Add a host      to the current Zone
+XBT_PUBLIC void sg_platf_new_hostlink(HostLinkCreationArgs* h);     // Add a host_link to the current Zone
+XBT_PUBLIC void sg_platf_new_link(LinkCreationArgs* link);          // Add a link      to the current Zone
+XBT_PUBLIC void sg_platf_new_peer(PeerCreationArgs* peer);          // Add a peer      to the current Zone
+XBT_PUBLIC void sg_platf_new_cluster(ClusterCreationArgs* clust);   // Add a cluster   to the current Zone
+XBT_PUBLIC void sg_platf_new_cabinet(CabinetCreationArgs* cabinet); // Add a cabinet   to the current Zone
+XBT_PUBLIC simgrid::kernel::routing::NetPoint*                      // Add a router    to the current Zone
+    sg_platf_new_router(std::string, const char* coords);
 
-XBT_PUBLIC(void) sg_platf_new_route(RouteCreationArgs* route);             // Add a route
-XBT_PUBLIC(void) sg_platf_new_bypassRoute(RouteCreationArgs* bypassroute); // Add a bypassRoute
+XBT_PUBLIC void sg_platf_new_route(RouteCreationArgs* route);             // Add a route
+XBT_PUBLIC void sg_platf_new_bypassRoute(RouteCreationArgs* bypassroute); // Add a bypassRoute
 
-XBT_PUBLIC(void) sg_platf_new_trace(TraceCreationArgs* trace);
+XBT_PUBLIC void sg_platf_new_trace(TraceCreationArgs* trace);
 
-XBT_PUBLIC(void) sg_platf_new_storage(StorageCreationArgs* storage); // Add a storage to the current Zone
-XBT_PUBLIC(void) sg_platf_new_storage_type(StorageTypeCreationArgs* storage_type);
-XBT_PUBLIC(void) sg_platf_new_mount(MountCreationArgs* mount);
+XBT_PUBLIC void sg_platf_new_storage(StorageCreationArgs* storage); // Add a storage to the current Zone
+XBT_PUBLIC void sg_platf_new_storage_type(StorageTypeCreationArgs* storage_type);
+XBT_PUBLIC void sg_platf_new_mount(MountCreationArgs* mount);
 
-XBT_PUBLIC(void) sg_platf_new_actor(ActorCreationArgs* actor);
+XBT_PUBLIC void sg_platf_new_actor(ActorCreationArgs* actor);
 XBT_PRIVATE void sg_platf_trace_connect(TraceConnectCreationArgs* trace_connect);
 
 /* Prototypes of the functions offered by flex */
-XBT_PUBLIC(int) surf_parse_lex();
-XBT_PUBLIC(int) surf_parse_get_lineno();
-XBT_PUBLIC(FILE *) surf_parse_get_in();
-XBT_PUBLIC(FILE *) surf_parse_get_out();
-XBT_PUBLIC(int) surf_parse_get_leng();
-XBT_PUBLIC(char *) surf_parse_get_text();
-XBT_PUBLIC(void) surf_parse_set_lineno(int line_number);
-XBT_PUBLIC(void) surf_parse_set_in(FILE * in_str);
-XBT_PUBLIC(void) surf_parse_set_out(FILE * out_str);
-XBT_PUBLIC(int) surf_parse_get_debug();
-XBT_PUBLIC(void) surf_parse_set_debug(int bdebug);
-XBT_PUBLIC(int) surf_parse_lex_destroy();
+XBT_PUBLIC int surf_parse_lex();
+XBT_PUBLIC int surf_parse_get_lineno();
+XBT_PUBLIC FILE* surf_parse_get_in();
+XBT_PUBLIC FILE* surf_parse_get_out();
+XBT_PUBLIC int surf_parse_get_leng();
+XBT_PUBLIC char* surf_parse_get_text();
+XBT_PUBLIC void surf_parse_set_lineno(int line_number);
+XBT_PUBLIC void surf_parse_set_in(FILE* in_str);
+XBT_PUBLIC void surf_parse_set_out(FILE* out_str);
+XBT_PUBLIC int surf_parse_get_debug();
+XBT_PUBLIC void surf_parse_set_debug(int bdebug);
+XBT_PUBLIC int surf_parse_lex_destroy();
 }
 
 namespace simgrid {
index 3883f56..5db30d4 100644 (file)
 #define _FLEXML_simgrid_H
 
 /* XML application entry points. */
-XBT_PUBLIC(void) STag_surfxml_AS(void);
-XBT_PUBLIC(void) ETag_surfxml_AS(void);
-XBT_PUBLIC(void) STag_surfxml_ASroute(void);
-XBT_PUBLIC(void) ETag_surfxml_ASroute(void);
-XBT_PUBLIC(void) STag_surfxml_actor(void);
-XBT_PUBLIC(void) ETag_surfxml_actor(void);
-XBT_PUBLIC(void) STag_surfxml_argument(void);
-XBT_PUBLIC(void) ETag_surfxml_argument(void);
-XBT_PUBLIC(void) STag_surfxml_backbone(void);
-XBT_PUBLIC(void) ETag_surfxml_backbone(void);
-XBT_PUBLIC(void) STag_surfxml_bypassASroute(void);
-XBT_PUBLIC(void) ETag_surfxml_bypassASroute(void);
-XBT_PUBLIC(void) STag_surfxml_bypassRoute(void);
-XBT_PUBLIC(void) ETag_surfxml_bypassRoute(void);
-XBT_PUBLIC(void) STag_surfxml_bypassZoneRoute(void);
-XBT_PUBLIC(void) ETag_surfxml_bypassZoneRoute(void);
-XBT_PUBLIC(void) STag_surfxml_cabinet(void);
-XBT_PUBLIC(void) ETag_surfxml_cabinet(void);
-XBT_PUBLIC(void) STag_surfxml_cluster(void);
-XBT_PUBLIC(void) ETag_surfxml_cluster(void);
-XBT_PUBLIC(void) STag_surfxml_config(void);
-XBT_PUBLIC(void) ETag_surfxml_config(void);
-XBT_PUBLIC(void) STag_surfxml_host(void);
-XBT_PUBLIC(void) ETag_surfxml_host(void);
-XBT_PUBLIC(void) STag_surfxml_host___link(void);
-XBT_PUBLIC(void) ETag_surfxml_host___link(void);
-XBT_PUBLIC(void) STag_surfxml_include(void);
-XBT_PUBLIC(void) ETag_surfxml_include(void);
-XBT_PUBLIC(void) STag_surfxml_link(void);
-XBT_PUBLIC(void) ETag_surfxml_link(void);
-XBT_PUBLIC(void) STag_surfxml_link___ctn(void);
-XBT_PUBLIC(void) ETag_surfxml_link___ctn(void);
-XBT_PUBLIC(void) STag_surfxml_model___prop(void);
-XBT_PUBLIC(void) ETag_surfxml_model___prop(void);
-XBT_PUBLIC(void) STag_surfxml_mount(void);
-XBT_PUBLIC(void) ETag_surfxml_mount(void);
-XBT_PUBLIC(void) STag_surfxml_peer(void);
-XBT_PUBLIC(void) ETag_surfxml_peer(void);
-XBT_PUBLIC(void) STag_surfxml_platform(void);
-XBT_PUBLIC(void) ETag_surfxml_platform(void);
-XBT_PUBLIC(void) STag_surfxml_process(void);
-XBT_PUBLIC(void) ETag_surfxml_process(void);
-XBT_PUBLIC(void) STag_surfxml_prop(void);
-XBT_PUBLIC(void) ETag_surfxml_prop(void);
-XBT_PUBLIC(void) STag_surfxml_random(void);
-XBT_PUBLIC(void) ETag_surfxml_random(void);
-XBT_PUBLIC(void) STag_surfxml_route(void);
-XBT_PUBLIC(void) ETag_surfxml_route(void);
-XBT_PUBLIC(void) STag_surfxml_router(void);
-XBT_PUBLIC(void) ETag_surfxml_router(void);
-XBT_PUBLIC(void) STag_surfxml_storage(void);
-XBT_PUBLIC(void) ETag_surfxml_storage(void);
-XBT_PUBLIC(void) STag_surfxml_storage___type(void);
-XBT_PUBLIC(void) ETag_surfxml_storage___type(void);
-XBT_PUBLIC(void) STag_surfxml_trace(void);
-XBT_PUBLIC(void) ETag_surfxml_trace(void);
-XBT_PUBLIC(void) STag_surfxml_trace___connect(void);
-XBT_PUBLIC(void) ETag_surfxml_trace___connect(void);
-XBT_PUBLIC(void) STag_surfxml_zone(void);
-XBT_PUBLIC(void) ETag_surfxml_zone(void);
-XBT_PUBLIC(void) STag_surfxml_zoneRoute(void);
-XBT_PUBLIC(void) ETag_surfxml_zoneRoute(void);
+XBT_PUBLIC void STag_surfxml_AS(void);
+XBT_PUBLIC void ETag_surfxml_AS(void);
+XBT_PUBLIC void STag_surfxml_ASroute(void);
+XBT_PUBLIC void ETag_surfxml_ASroute(void);
+XBT_PUBLIC void STag_surfxml_actor(void);
+XBT_PUBLIC void ETag_surfxml_actor(void);
+XBT_PUBLIC void STag_surfxml_argument(void);
+XBT_PUBLIC void ETag_surfxml_argument(void);
+XBT_PUBLIC void STag_surfxml_backbone(void);
+XBT_PUBLIC void ETag_surfxml_backbone(void);
+XBT_PUBLIC void STag_surfxml_bypassASroute(void);
+XBT_PUBLIC void ETag_surfxml_bypassASroute(void);
+XBT_PUBLIC void STag_surfxml_bypassRoute(void);
+XBT_PUBLIC void ETag_surfxml_bypassRoute(void);
+XBT_PUBLIC void STag_surfxml_bypassZoneRoute(void);
+XBT_PUBLIC void ETag_surfxml_bypassZoneRoute(void);
+XBT_PUBLIC void STag_surfxml_cabinet(void);
+XBT_PUBLIC void ETag_surfxml_cabinet(void);
+XBT_PUBLIC void STag_surfxml_cluster(void);
+XBT_PUBLIC void ETag_surfxml_cluster(void);
+XBT_PUBLIC void STag_surfxml_config(void);
+XBT_PUBLIC void ETag_surfxml_config(void);
+XBT_PUBLIC void STag_surfxml_host(void);
+XBT_PUBLIC void ETag_surfxml_host(void);
+XBT_PUBLIC void STag_surfxml_host___link(void);
+XBT_PUBLIC void ETag_surfxml_host___link(void);
+XBT_PUBLIC void STag_surfxml_include(void);
+XBT_PUBLIC void ETag_surfxml_include(void);
+XBT_PUBLIC void STag_surfxml_link(void);
+XBT_PUBLIC void ETag_surfxml_link(void);
+XBT_PUBLIC void STag_surfxml_link___ctn(void);
+XBT_PUBLIC void ETag_surfxml_link___ctn(void);
+XBT_PUBLIC void STag_surfxml_model___prop(void);
+XBT_PUBLIC void ETag_surfxml_model___prop(void);
+XBT_PUBLIC void STag_surfxml_mount(void);
+XBT_PUBLIC void ETag_surfxml_mount(void);
+XBT_PUBLIC void STag_surfxml_peer(void);
+XBT_PUBLIC void ETag_surfxml_peer(void);
+XBT_PUBLIC void STag_surfxml_platform(void);
+XBT_PUBLIC void ETag_surfxml_platform(void);
+XBT_PUBLIC void STag_surfxml_process(void);
+XBT_PUBLIC void ETag_surfxml_process(void);
+XBT_PUBLIC void STag_surfxml_prop(void);
+XBT_PUBLIC void ETag_surfxml_prop(void);
+XBT_PUBLIC void STag_surfxml_random(void);
+XBT_PUBLIC void ETag_surfxml_random(void);
+XBT_PUBLIC void STag_surfxml_route(void);
+XBT_PUBLIC void ETag_surfxml_route(void);
+XBT_PUBLIC void STag_surfxml_router(void);
+XBT_PUBLIC void ETag_surfxml_router(void);
+XBT_PUBLIC void STag_surfxml_storage(void);
+XBT_PUBLIC void ETag_surfxml_storage(void);
+XBT_PUBLIC void STag_surfxml_storage___type(void);
+XBT_PUBLIC void ETag_surfxml_storage___type(void);
+XBT_PUBLIC void STag_surfxml_trace(void);
+XBT_PUBLIC void ETag_surfxml_trace(void);
+XBT_PUBLIC void STag_surfxml_trace___connect(void);
+XBT_PUBLIC void ETag_surfxml_trace___connect(void);
+XBT_PUBLIC void STag_surfxml_zone(void);
+XBT_PUBLIC void ETag_surfxml_zone(void);
+XBT_PUBLIC void STag_surfxml_zoneRoute(void);
+XBT_PUBLIC void ETag_surfxml_zoneRoute(void);
 
 /* XML application data. */
 typedef int AT_surfxml_AS_id;
@@ -352,393 +352,393 @@ typedef int AT_surfxml_zoneRoute_src;
 typedef enum { AU_surfxml_zoneRoute_symmetrical, A_surfxml_zoneRoute_symmetrical_YES,A_surfxml_zoneRoute_symmetrical_NO } AT_surfxml_zoneRoute_symmetrical;
 
 /* FleXML-provided data. */
-XBT_PUBLIC_DATA(int) surfxml_pcdata_ix;
-XBT_PUBLIC_DATA(char *) surfxml_bufferstack;
+XBT_PUBLIC_DATA int surfxml_pcdata_ix;
+XBT_PUBLIC_DATA char *surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
-XBT_PUBLIC_DATA(AT_surfxml_AS_id) AX_surfxml_AS_id;
+XBT_PUBLIC_DATA AT_surfxml_AS_id AX_surfxml_AS_id;
 #define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
-XBT_PUBLIC_DATA(short int) surfxml_AS_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_AS_routing) AX_surfxml_AS_routing;
+XBT_PUBLIC_DATA short int surfxml_AS_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_AS_routing AX_surfxml_AS_routing;
 #define A_surfxml_AS_routing AX_surfxml_AS_routing
-XBT_PUBLIC_DATA(short int) surfxml_AS_routing_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_dst) AX_surfxml_ASroute_dst;
+XBT_PUBLIC_DATA short int surfxml_AS_routing_isset;
+XBT_PUBLIC_DATA AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
 #define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_gw___dst) AX_surfxml_ASroute_gw___dst;
+XBT_PUBLIC_DATA short int surfxml_ASroute_dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_ASroute_gw___dst AX_surfxml_ASroute_gw___dst;
 #define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_gw___dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_gw___src) AX_surfxml_ASroute_gw___src;
+XBT_PUBLIC_DATA short int surfxml_ASroute_gw___dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_ASroute_gw___src AX_surfxml_ASroute_gw___src;
 #define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_gw___src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_src) AX_surfxml_ASroute_src;
+XBT_PUBLIC_DATA short int surfxml_ASroute_gw___src_isset;
+XBT_PUBLIC_DATA AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
 #define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_symmetrical) AX_surfxml_ASroute_symmetrical;
+XBT_PUBLIC_DATA short int surfxml_ASroute_src_isset;
+XBT_PUBLIC_DATA AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
 #define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_symmetrical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_actor_function) AX_surfxml_actor_function;
+XBT_PUBLIC_DATA short int surfxml_ASroute_symmetrical_isset;
+XBT_PUBLIC_DATA AT_surfxml_actor_function AX_surfxml_actor_function;
 #define A_surfxml_actor_function (surfxml_bufferstack + AX_surfxml_actor_function)
-XBT_PUBLIC_DATA(short int) surfxml_actor_function_isset;
-XBT_PUBLIC_DATA(AT_surfxml_actor_host) AX_surfxml_actor_host;
+XBT_PUBLIC_DATA short int surfxml_actor_function_isset;
+XBT_PUBLIC_DATA AT_surfxml_actor_host AX_surfxml_actor_host;
 #define A_surfxml_actor_host (surfxml_bufferstack + AX_surfxml_actor_host)
-XBT_PUBLIC_DATA(short int) surfxml_actor_host_isset;
-XBT_PUBLIC_DATA(AT_surfxml_actor_kill___time) AX_surfxml_actor_kill___time;
+XBT_PUBLIC_DATA short int surfxml_actor_host_isset;
+XBT_PUBLIC_DATA AT_surfxml_actor_kill___time AX_surfxml_actor_kill___time;
 #define A_surfxml_actor_kill___time (surfxml_bufferstack + AX_surfxml_actor_kill___time)
-XBT_PUBLIC_DATA(short int) surfxml_actor_kill___time_isset;
-XBT_PUBLIC_DATA(AT_surfxml_actor_on___failure) AX_surfxml_actor_on___failure;
+XBT_PUBLIC_DATA short int surfxml_actor_kill___time_isset;
+XBT_PUBLIC_DATA AT_surfxml_actor_on___failure AX_surfxml_actor_on___failure;
 #define A_surfxml_actor_on___failure AX_surfxml_actor_on___failure
-XBT_PUBLIC_DATA(short int) surfxml_actor_on___failure_isset;
-XBT_PUBLIC_DATA(AT_surfxml_actor_start___time) AX_surfxml_actor_start___time;
+XBT_PUBLIC_DATA short int surfxml_actor_on___failure_isset;
+XBT_PUBLIC_DATA AT_surfxml_actor_start___time AX_surfxml_actor_start___time;
 #define A_surfxml_actor_start___time (surfxml_bufferstack + AX_surfxml_actor_start___time)
-XBT_PUBLIC_DATA(short int) surfxml_actor_start___time_isset;
-XBT_PUBLIC_DATA(AT_surfxml_argument_value) AX_surfxml_argument_value;
+XBT_PUBLIC_DATA short int surfxml_actor_start___time_isset;
+XBT_PUBLIC_DATA AT_surfxml_argument_value AX_surfxml_argument_value;
 #define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
-XBT_PUBLIC_DATA(short int) surfxml_argument_value_isset;
-XBT_PUBLIC_DATA(AT_surfxml_backbone_bandwidth) AX_surfxml_backbone_bandwidth;
+XBT_PUBLIC_DATA short int surfxml_argument_value_isset;
+XBT_PUBLIC_DATA AT_surfxml_backbone_bandwidth AX_surfxml_backbone_bandwidth;
 #define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth)
-XBT_PUBLIC_DATA(short int) surfxml_backbone_bandwidth_isset;
-XBT_PUBLIC_DATA(AT_surfxml_backbone_id) AX_surfxml_backbone_id;
+XBT_PUBLIC_DATA short int surfxml_backbone_bandwidth_isset;
+XBT_PUBLIC_DATA AT_surfxml_backbone_id AX_surfxml_backbone_id;
 #define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
-XBT_PUBLIC_DATA(short int) surfxml_backbone_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_backbone_latency) AX_surfxml_backbone_latency;
+XBT_PUBLIC_DATA short int surfxml_backbone_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_backbone_latency AX_surfxml_backbone_latency;
 #define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency)
-XBT_PUBLIC_DATA(short int) surfxml_backbone_latency_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_dst) AX_surfxml_bypassASroute_dst;
+XBT_PUBLIC_DATA short int surfxml_backbone_latency_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassASroute_dst AX_surfxml_bypassASroute_dst;
 #define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___dst) AX_surfxml_bypassASroute_gw___dst;
+XBT_PUBLIC_DATA short int surfxml_bypassASroute_dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassASroute_gw___dst AX_surfxml_bypassASroute_gw___dst;
 #define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_gw___dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___src) AX_surfxml_bypassASroute_gw___src;
+XBT_PUBLIC_DATA short int surfxml_bypassASroute_gw___dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassASroute_gw___src AX_surfxml_bypassASroute_gw___src;
 #define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_gw___src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_src) AX_surfxml_bypassASroute_src;
+XBT_PUBLIC_DATA short int surfxml_bypassASroute_gw___src_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassASroute_src AX_surfxml_bypassASroute_src;
 #define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassRoute_dst) AX_surfxml_bypassRoute_dst;
+XBT_PUBLIC_DATA short int surfxml_bypassASroute_src_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst;
 #define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassRoute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassRoute_src) AX_surfxml_bypassRoute_src;
+XBT_PUBLIC_DATA short int surfxml_bypassRoute_dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
 #define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
-XBT_PUBLIC_DATA(short int) surfxml_bypassRoute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassZoneRoute_dst) AX_surfxml_bypassZoneRoute_dst;
+XBT_PUBLIC_DATA short int surfxml_bypassRoute_src_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_dst AX_surfxml_bypassZoneRoute_dst;
 #define A_surfxml_bypassZoneRoute_dst (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassZoneRoute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassZoneRoute_gw___dst) AX_surfxml_bypassZoneRoute_gw___dst;
+XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_gw___dst AX_surfxml_bypassZoneRoute_gw___dst;
 #define A_surfxml_bypassZoneRoute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_gw___dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassZoneRoute_gw___dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassZoneRoute_gw___src) AX_surfxml_bypassZoneRoute_gw___src;
+XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_gw___dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_gw___src AX_surfxml_bypassZoneRoute_gw___src;
 #define A_surfxml_bypassZoneRoute_gw___src (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_gw___src)
-XBT_PUBLIC_DATA(short int) surfxml_bypassZoneRoute_gw___src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassZoneRoute_src) AX_surfxml_bypassZoneRoute_src;
+XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_gw___src_isset;
+XBT_PUBLIC_DATA AT_surfxml_bypassZoneRoute_src AX_surfxml_bypassZoneRoute_src;
 #define A_surfxml_bypassZoneRoute_src (surfxml_bufferstack + AX_surfxml_bypassZoneRoute_src)
-XBT_PUBLIC_DATA(short int) surfxml_bypassZoneRoute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_bw) AX_surfxml_cabinet_bw;
+XBT_PUBLIC_DATA short int surfxml_bypassZoneRoute_src_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_bw AX_surfxml_cabinet_bw;
 #define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_id) AX_surfxml_cabinet_id;
+XBT_PUBLIC_DATA short int surfxml_cabinet_bw_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_id AX_surfxml_cabinet_id;
 #define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_lat) AX_surfxml_cabinet_lat;
+XBT_PUBLIC_DATA short int surfxml_cabinet_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_lat AX_surfxml_cabinet_lat;
 #define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_prefix) AX_surfxml_cabinet_prefix;
+XBT_PUBLIC_DATA short int surfxml_cabinet_lat_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_prefix AX_surfxml_cabinet_prefix;
 #define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_prefix_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_radical) AX_surfxml_cabinet_radical;
+XBT_PUBLIC_DATA short int surfxml_cabinet_prefix_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_radical AX_surfxml_cabinet_radical;
 #define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_radical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_speed) AX_surfxml_cabinet_speed;
+XBT_PUBLIC_DATA short int surfxml_cabinet_radical_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_speed AX_surfxml_cabinet_speed;
 #define A_surfxml_cabinet_speed (surfxml_bufferstack + AX_surfxml_cabinet_speed)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_speed_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_suffix) AX_surfxml_cabinet_suffix;
+XBT_PUBLIC_DATA short int surfxml_cabinet_speed_isset;
+XBT_PUBLIC_DATA AT_surfxml_cabinet_suffix AX_surfxml_cabinet_suffix;
 #define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_suffix_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___bw) AX_surfxml_cluster_bb___bw;
+XBT_PUBLIC_DATA short int surfxml_cabinet_suffix_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_bb___bw AX_surfxml_cluster_bb___bw;
 #define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___lat) AX_surfxml_cluster_bb___lat;
+XBT_PUBLIC_DATA short int surfxml_cluster_bb___bw_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_bb___lat AX_surfxml_cluster_bb___lat;
 #define A_surfxml_cluster_bb___lat (surfxml_bufferstack + AX_surfxml_cluster_bb___lat)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___sharing___policy) AX_surfxml_cluster_bb___sharing___policy;
+XBT_PUBLIC_DATA short int surfxml_cluster_bb___lat_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy;
 #define A_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___sharing___policy_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bw) AX_surfxml_cluster_bw;
+XBT_PUBLIC_DATA short int surfxml_cluster_bb___sharing___policy_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
 #define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_core) AX_surfxml_cluster_core;
+XBT_PUBLIC_DATA short int surfxml_cluster_bw_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_core AX_surfxml_cluster_core;
 #define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_core_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_id) AX_surfxml_cluster_id;
+XBT_PUBLIC_DATA short int surfxml_cluster_core_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_id AX_surfxml_cluster_id;
 #define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_lat) AX_surfxml_cluster_lat;
+XBT_PUBLIC_DATA short int surfxml_cluster_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
 #define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_limiter___link) AX_surfxml_cluster_limiter___link;
+XBT_PUBLIC_DATA short int surfxml_cluster_lat_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_limiter___link AX_surfxml_cluster_limiter___link;
 #define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_limiter___link_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_loopback___bw) AX_surfxml_cluster_loopback___bw;
+XBT_PUBLIC_DATA short int surfxml_cluster_limiter___link_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_loopback___bw AX_surfxml_cluster_loopback___bw;
 #define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_loopback___bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_loopback___lat) AX_surfxml_cluster_loopback___lat;
+XBT_PUBLIC_DATA short int surfxml_cluster_loopback___bw_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_loopback___lat AX_surfxml_cluster_loopback___lat;
 #define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_loopback___lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_prefix) AX_surfxml_cluster_prefix;
+XBT_PUBLIC_DATA short int surfxml_cluster_loopback___lat_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
 #define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_prefix_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_radical) AX_surfxml_cluster_radical;
+XBT_PUBLIC_DATA short int surfxml_cluster_prefix_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
 #define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_radical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_router___id) AX_surfxml_cluster_router___id;
+XBT_PUBLIC_DATA short int surfxml_cluster_radical_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_router___id AX_surfxml_cluster_router___id;
 #define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_router___id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_sharing___policy) AX_surfxml_cluster_sharing___policy;
+XBT_PUBLIC_DATA short int surfxml_cluster_router___id_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy;
 #define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy
-XBT_PUBLIC_DATA(short int) surfxml_cluster_sharing___policy_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_speed) AX_surfxml_cluster_speed;
+XBT_PUBLIC_DATA short int surfxml_cluster_sharing___policy_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_speed AX_surfxml_cluster_speed;
 #define A_surfxml_cluster_speed (surfxml_bufferstack + AX_surfxml_cluster_speed)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_speed_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_suffix) AX_surfxml_cluster_suffix;
+XBT_PUBLIC_DATA short int surfxml_cluster_speed_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
 #define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_suffix_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_topo___parameters) AX_surfxml_cluster_topo___parameters;
+XBT_PUBLIC_DATA short int surfxml_cluster_suffix_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_topo___parameters AX_surfxml_cluster_topo___parameters;
 #define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_topo___parameters_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_topology) AX_surfxml_cluster_topology;
+XBT_PUBLIC_DATA short int surfxml_cluster_topo___parameters_isset;
+XBT_PUBLIC_DATA AT_surfxml_cluster_topology AX_surfxml_cluster_topology;
 #define A_surfxml_cluster_topology AX_surfxml_cluster_topology
-XBT_PUBLIC_DATA(short int) surfxml_cluster_topology_isset;
-XBT_PUBLIC_DATA(AT_surfxml_config_id) AX_surfxml_config_id;
+XBT_PUBLIC_DATA short int surfxml_cluster_topology_isset;
+XBT_PUBLIC_DATA AT_surfxml_config_id AX_surfxml_config_id;
 #define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
-XBT_PUBLIC_DATA(short int) surfxml_config_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_availability___file) AX_surfxml_host_availability___file;
+XBT_PUBLIC_DATA short int surfxml_config_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_availability___file AX_surfxml_host_availability___file;
 #define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file)
-XBT_PUBLIC_DATA(short int) surfxml_host_availability___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_coordinates) AX_surfxml_host_coordinates;
+XBT_PUBLIC_DATA short int surfxml_host_availability___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_coordinates AX_surfxml_host_coordinates;
 #define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
-XBT_PUBLIC_DATA(short int) surfxml_host_coordinates_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_core) AX_surfxml_host_core;
+XBT_PUBLIC_DATA short int surfxml_host_coordinates_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_core AX_surfxml_host_core;
 #define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
-XBT_PUBLIC_DATA(short int) surfxml_host_core_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_id) AX_surfxml_host_id;
+XBT_PUBLIC_DATA short int surfxml_host_core_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_id AX_surfxml_host_id;
 #define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
-XBT_PUBLIC_DATA(short int) surfxml_host_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_pstate) AX_surfxml_host_pstate;
+XBT_PUBLIC_DATA short int surfxml_host_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_pstate AX_surfxml_host_pstate;
 #define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate)
-XBT_PUBLIC_DATA(short int) surfxml_host_pstate_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_speed) AX_surfxml_host_speed;
+XBT_PUBLIC_DATA short int surfxml_host_pstate_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_speed AX_surfxml_host_speed;
 #define A_surfxml_host_speed (surfxml_bufferstack + AX_surfxml_host_speed)
-XBT_PUBLIC_DATA(short int) surfxml_host_speed_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_state___file) AX_surfxml_host_state___file;
+XBT_PUBLIC_DATA short int surfxml_host_speed_isset;
+XBT_PUBLIC_DATA AT_surfxml_host_state___file AX_surfxml_host_state___file;
 #define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_host_state___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host___link_down) AX_surfxml_host___link_down;
+XBT_PUBLIC_DATA short int surfxml_host_state___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_host___link_down AX_surfxml_host___link_down;
 #define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down)
-XBT_PUBLIC_DATA(short int) surfxml_host___link_down_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host___link_id) AX_surfxml_host___link_id;
+XBT_PUBLIC_DATA short int surfxml_host___link_down_isset;
+XBT_PUBLIC_DATA AT_surfxml_host___link_id AX_surfxml_host___link_id;
 #define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id)
-XBT_PUBLIC_DATA(short int) surfxml_host___link_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host___link_up) AX_surfxml_host___link_up;
+XBT_PUBLIC_DATA short int surfxml_host___link_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_host___link_up AX_surfxml_host___link_up;
 #define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
-XBT_PUBLIC_DATA(short int) surfxml_host___link_up_isset;
-XBT_PUBLIC_DATA(AT_surfxml_include_file) AX_surfxml_include_file;
+XBT_PUBLIC_DATA short int surfxml_host___link_up_isset;
+XBT_PUBLIC_DATA AT_surfxml_include_file AX_surfxml_include_file;
 #define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
-XBT_PUBLIC_DATA(short int) surfxml_include_file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_bandwidth) AX_surfxml_link_bandwidth;
+XBT_PUBLIC_DATA short int surfxml_include_file_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
 #define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
-XBT_PUBLIC_DATA(short int) surfxml_link_bandwidth_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_bandwidth___file) AX_surfxml_link_bandwidth___file;
+XBT_PUBLIC_DATA short int surfxml_link_bandwidth_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_bandwidth___file AX_surfxml_link_bandwidth___file;
 #define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file)
-XBT_PUBLIC_DATA(short int) surfxml_link_bandwidth___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_id) AX_surfxml_link_id;
+XBT_PUBLIC_DATA short int surfxml_link_bandwidth___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_id AX_surfxml_link_id;
 #define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
-XBT_PUBLIC_DATA(short int) surfxml_link_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_latency) AX_surfxml_link_latency;
+XBT_PUBLIC_DATA short int surfxml_link_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_latency AX_surfxml_link_latency;
 #define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
-XBT_PUBLIC_DATA(short int) surfxml_link_latency_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_latency___file) AX_surfxml_link_latency___file;
+XBT_PUBLIC_DATA short int surfxml_link_latency_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_latency___file AX_surfxml_link_latency___file;
 #define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file)
-XBT_PUBLIC_DATA(short int) surfxml_link_latency___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_sharing___policy) AX_surfxml_link_sharing___policy;
+XBT_PUBLIC_DATA short int surfxml_link_latency___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy;
 #define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy
-XBT_PUBLIC_DATA(short int) surfxml_link_sharing___policy_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_state___file) AX_surfxml_link_state___file;
+XBT_PUBLIC_DATA short int surfxml_link_sharing___policy_isset;
+XBT_PUBLIC_DATA AT_surfxml_link_state___file AX_surfxml_link_state___file;
 #define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_link_state___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link___ctn_direction) AX_surfxml_link___ctn_direction;
+XBT_PUBLIC_DATA short int surfxml_link_state___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction;
 #define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction
-XBT_PUBLIC_DATA(short int) surfxml_link___ctn_direction_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link___ctn_id) AX_surfxml_link___ctn_id;
+XBT_PUBLIC_DATA short int surfxml_link___ctn_direction_isset;
+XBT_PUBLIC_DATA AT_surfxml_link___ctn_id AX_surfxml_link___ctn_id;
 #define A_surfxml_link___ctn_id (surfxml_bufferstack + AX_surfxml_link___ctn_id)
-XBT_PUBLIC_DATA(short int) surfxml_link___ctn_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_model___prop_id) AX_surfxml_model___prop_id;
+XBT_PUBLIC_DATA short int surfxml_link___ctn_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_model___prop_id AX_surfxml_model___prop_id;
 #define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id)
-XBT_PUBLIC_DATA(short int) surfxml_model___prop_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_model___prop_value) AX_surfxml_model___prop_value;
+XBT_PUBLIC_DATA short int surfxml_model___prop_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_model___prop_value AX_surfxml_model___prop_value;
 #define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value)
-XBT_PUBLIC_DATA(short int) surfxml_model___prop_value_isset;
-XBT_PUBLIC_DATA(AT_surfxml_mount_name) AX_surfxml_mount_name;
+XBT_PUBLIC_DATA short int surfxml_model___prop_value_isset;
+XBT_PUBLIC_DATA AT_surfxml_mount_name AX_surfxml_mount_name;
 #define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name)
-XBT_PUBLIC_DATA(short int) surfxml_mount_name_isset;
-XBT_PUBLIC_DATA(AT_surfxml_mount_storageId) AX_surfxml_mount_storageId;
+XBT_PUBLIC_DATA short int surfxml_mount_name_isset;
+XBT_PUBLIC_DATA AT_surfxml_mount_storageId AX_surfxml_mount_storageId;
 #define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId)
-XBT_PUBLIC_DATA(short int) surfxml_mount_storageId_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_availability___file) AX_surfxml_peer_availability___file;
+XBT_PUBLIC_DATA short int surfxml_mount_storageId_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_availability___file AX_surfxml_peer_availability___file;
 #define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file)
-XBT_PUBLIC_DATA(short int) surfxml_peer_availability___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_bw___in) AX_surfxml_peer_bw___in;
+XBT_PUBLIC_DATA short int surfxml_peer_availability___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_bw___in AX_surfxml_peer_bw___in;
 #define A_surfxml_peer_bw___in (surfxml_bufferstack + AX_surfxml_peer_bw___in)
-XBT_PUBLIC_DATA(short int) surfxml_peer_bw___in_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_bw___out) AX_surfxml_peer_bw___out;
+XBT_PUBLIC_DATA short int surfxml_peer_bw___in_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_bw___out AX_surfxml_peer_bw___out;
 #define A_surfxml_peer_bw___out (surfxml_bufferstack + AX_surfxml_peer_bw___out)
-XBT_PUBLIC_DATA(short int) surfxml_peer_bw___out_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_coordinates) AX_surfxml_peer_coordinates;
+XBT_PUBLIC_DATA short int surfxml_peer_bw___out_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates;
 #define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
-XBT_PUBLIC_DATA(short int) surfxml_peer_coordinates_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_id) AX_surfxml_peer_id;
+XBT_PUBLIC_DATA short int surfxml_peer_coordinates_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_id AX_surfxml_peer_id;
 #define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
-XBT_PUBLIC_DATA(short int) surfxml_peer_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_lat) AX_surfxml_peer_lat;
+XBT_PUBLIC_DATA short int surfxml_peer_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_lat AX_surfxml_peer_lat;
 #define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
-XBT_PUBLIC_DATA(short int) surfxml_peer_lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_speed) AX_surfxml_peer_speed;
+XBT_PUBLIC_DATA short int surfxml_peer_lat_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_speed AX_surfxml_peer_speed;
 #define A_surfxml_peer_speed (surfxml_bufferstack + AX_surfxml_peer_speed)
-XBT_PUBLIC_DATA(short int) surfxml_peer_speed_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_state___file) AX_surfxml_peer_state___file;
+XBT_PUBLIC_DATA short int surfxml_peer_speed_isset;
+XBT_PUBLIC_DATA AT_surfxml_peer_state___file AX_surfxml_peer_state___file;
 #define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_peer_state___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_platform_version) AX_surfxml_platform_version;
+XBT_PUBLIC_DATA short int surfxml_peer_state___file_isset;
+XBT_PUBLIC_DATA AT_surfxml_platform_version AX_surfxml_platform_version;
 #define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
-XBT_PUBLIC_DATA(short int) surfxml_platform_version_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_function) AX_surfxml_process_function;
+XBT_PUBLIC_DATA short int surfxml_platform_version_isset;
+XBT_PUBLIC_DATA AT_surfxml_process_function AX_surfxml_process_function;
 #define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
-XBT_PUBLIC_DATA(short int) surfxml_process_function_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_host) AX_surfxml_process_host;
+XBT_PUBLIC_DATA short int surfxml_process_function_isset;
+XBT_PUBLIC_DATA AT_surfxml_process_host AX_surfxml_process_host;
 #define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
-XBT_PUBLIC_DATA(short int) surfxml_process_host_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_kill___time) AX_surfxml_process_kill___time;
+XBT_PUBLIC_DATA short int surfxml_process_host_isset;
+XBT_PUBLIC_DATA AT_surfxml_process_kill___time AX_surfxml_process_kill___time;
 #define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time)
-XBT_PUBLIC_DATA(short int) surfxml_process_kill___time_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_on___failure) AX_surfxml_process_on___failure;
+XBT_PUBLIC_DATA short int surfxml_process_kill___time_isset;
+XBT_PUBLIC_DATA AT_surfxml_process_on___failure AX_surfxml_process_on___failure;
 #define A_surfxml_process_on___failure AX_surfxml_process_on___failure
-XBT_PUBLIC_DATA(short int) surfxml_process_on___failure_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_start___time) AX_surfxml_process_start___time;
+XBT_PUBLIC_DATA short int surfxml_process_on___failure_isset;
+XBT_PUBLIC_DATA AT_surfxml_process_start___time AX_surfxml_process_start___time;
 #define A_surfxml_process_start___time (surfxml_bufferstack + AX_surfxml_process_start___time)
-XBT_PUBLIC_DATA(short int) surfxml_process_start___time_isset;
-XBT_PUBLIC_DATA(AT_surfxml_prop_id) AX_surfxml_prop_id;
+XBT_PUBLIC_DATA short int surfxml_process_start___time_isset;
+XBT_PUBLIC_DATA AT_surfxml_prop_id AX_surfxml_prop_id;
 #define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
-XBT_PUBLIC_DATA(short int) surfxml_prop_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_prop_value) AX_surfxml_prop_value;
+XBT_PUBLIC_DATA short int surfxml_prop_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_prop_value AX_surfxml_prop_value;
 #define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
-XBT_PUBLIC_DATA(short int) surfxml_prop_value_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_generator) AX_surfxml_random_generator;
+XBT_PUBLIC_DATA short int surfxml_prop_value_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_generator AX_surfxml_random_generator;
 #define A_surfxml_random_generator AX_surfxml_random_generator
-XBT_PUBLIC_DATA(short int) surfxml_random_generator_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_id) AX_surfxml_random_id;
+XBT_PUBLIC_DATA short int surfxml_random_generator_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_id AX_surfxml_random_id;
 #define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
-XBT_PUBLIC_DATA(short int) surfxml_random_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_max) AX_surfxml_random_max;
+XBT_PUBLIC_DATA short int surfxml_random_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_max AX_surfxml_random_max;
 #define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
-XBT_PUBLIC_DATA(short int) surfxml_random_max_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_mean) AX_surfxml_random_mean;
+XBT_PUBLIC_DATA short int surfxml_random_max_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_mean AX_surfxml_random_mean;
 #define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
-XBT_PUBLIC_DATA(short int) surfxml_random_mean_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_min) AX_surfxml_random_min;
+XBT_PUBLIC_DATA short int surfxml_random_mean_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_min AX_surfxml_random_min;
 #define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
-XBT_PUBLIC_DATA(short int) surfxml_random_min_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_radical) AX_surfxml_random_radical;
+XBT_PUBLIC_DATA short int surfxml_random_min_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_radical AX_surfxml_random_radical;
 #define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
-XBT_PUBLIC_DATA(short int) surfxml_random_radical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_seed) AX_surfxml_random_seed;
+XBT_PUBLIC_DATA short int surfxml_random_radical_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_seed AX_surfxml_random_seed;
 #define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
-XBT_PUBLIC_DATA(short int) surfxml_random_seed_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_std___deviation) AX_surfxml_random_std___deviation;
+XBT_PUBLIC_DATA short int surfxml_random_seed_isset;
+XBT_PUBLIC_DATA AT_surfxml_random_std___deviation AX_surfxml_random_std___deviation;
 #define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation)
-XBT_PUBLIC_DATA(short int) surfxml_random_std___deviation_isset;
-XBT_PUBLIC_DATA(AT_surfxml_route_dst) AX_surfxml_route_dst;
+XBT_PUBLIC_DATA short int surfxml_random_std___deviation_isset;
+XBT_PUBLIC_DATA AT_surfxml_route_dst AX_surfxml_route_dst;
 #define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
-XBT_PUBLIC_DATA(short int) surfxml_route_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_route_src) AX_surfxml_route_src;
+XBT_PUBLIC_DATA short int surfxml_route_dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_route_src AX_surfxml_route_src;
 #define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
-XBT_PUBLIC_DATA(short int) surfxml_route_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_route_symmetrical) AX_surfxml_route_symmetrical;
+XBT_PUBLIC_DATA short int surfxml_route_src_isset;
+XBT_PUBLIC_DATA AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical;
 #define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
-XBT_PUBLIC_DATA(short int) surfxml_route_symmetrical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_router_coordinates) AX_surfxml_router_coordinates;
+XBT_PUBLIC_DATA short int surfxml_route_symmetrical_isset;
+XBT_PUBLIC_DATA AT_surfxml_router_coordinates AX_surfxml_router_coordinates;
 #define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
-XBT_PUBLIC_DATA(short int) surfxml_router_coordinates_isset;
-XBT_PUBLIC_DATA(AT_surfxml_router_id) AX_surfxml_router_id;
+XBT_PUBLIC_DATA short int surfxml_router_coordinates_isset;
+XBT_PUBLIC_DATA AT_surfxml_router_id AX_surfxml_router_id;
 #define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
-XBT_PUBLIC_DATA(short int) surfxml_router_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_attach) AX_surfxml_storage_attach;
+XBT_PUBLIC_DATA short int surfxml_router_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage_attach AX_surfxml_storage_attach;
 #define A_surfxml_storage_attach (surfxml_bufferstack + AX_surfxml_storage_attach)
-XBT_PUBLIC_DATA(short int) surfxml_storage_attach_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_content) AX_surfxml_storage_content;
+XBT_PUBLIC_DATA short int surfxml_storage_attach_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage_content AX_surfxml_storage_content;
 #define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
-XBT_PUBLIC_DATA(short int) surfxml_storage_content_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_id) AX_surfxml_storage_id;
+XBT_PUBLIC_DATA short int surfxml_storage_content_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage_id AX_surfxml_storage_id;
 #define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
-XBT_PUBLIC_DATA(short int) surfxml_storage_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_typeId) AX_surfxml_storage_typeId;
+XBT_PUBLIC_DATA short int surfxml_storage_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage_typeId AX_surfxml_storage_typeId;
 #define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
-XBT_PUBLIC_DATA(short int) surfxml_storage_typeId_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_content) AX_surfxml_storage___type_content;
+XBT_PUBLIC_DATA short int surfxml_storage_typeId_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage___type_content AX_surfxml_storage___type_content;
 #define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_content_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_id) AX_surfxml_storage___type_id;
+XBT_PUBLIC_DATA short int surfxml_storage___type_content_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage___type_id AX_surfxml_storage___type_id;
 #define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_model) AX_surfxml_storage___type_model;
+XBT_PUBLIC_DATA short int surfxml_storage___type_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage___type_model AX_surfxml_storage___type_model;
 #define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_model_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_size) AX_surfxml_storage___type_size;
+XBT_PUBLIC_DATA short int surfxml_storage___type_model_isset;
+XBT_PUBLIC_DATA AT_surfxml_storage___type_size AX_surfxml_storage___type_size;
 #define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_size_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace_file) AX_surfxml_trace_file;
+XBT_PUBLIC_DATA short int surfxml_storage___type_size_isset;
+XBT_PUBLIC_DATA AT_surfxml_trace_file AX_surfxml_trace_file;
 #define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
-XBT_PUBLIC_DATA(short int) surfxml_trace_file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace_id) AX_surfxml_trace_id;
+XBT_PUBLIC_DATA short int surfxml_trace_file_isset;
+XBT_PUBLIC_DATA AT_surfxml_trace_id AX_surfxml_trace_id;
 #define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
-XBT_PUBLIC_DATA(short int) surfxml_trace_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace_periodicity) AX_surfxml_trace_periodicity;
+XBT_PUBLIC_DATA short int surfxml_trace_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
 #define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
-XBT_PUBLIC_DATA(short int) surfxml_trace_periodicity_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace___connect_element) AX_surfxml_trace___connect_element;
+XBT_PUBLIC_DATA short int surfxml_trace_periodicity_isset;
+XBT_PUBLIC_DATA AT_surfxml_trace___connect_element AX_surfxml_trace___connect_element;
 #define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element)
-XBT_PUBLIC_DATA(short int) surfxml_trace___connect_element_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace___connect_kind) AX_surfxml_trace___connect_kind;
+XBT_PUBLIC_DATA short int surfxml_trace___connect_element_isset;
+XBT_PUBLIC_DATA AT_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind;
 #define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind
-XBT_PUBLIC_DATA(short int) surfxml_trace___connect_kind_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace___connect_trace) AX_surfxml_trace___connect_trace;
+XBT_PUBLIC_DATA short int surfxml_trace___connect_kind_isset;
+XBT_PUBLIC_DATA AT_surfxml_trace___connect_trace AX_surfxml_trace___connect_trace;
 #define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace)
-XBT_PUBLIC_DATA(short int) surfxml_trace___connect_trace_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zone_id) AX_surfxml_zone_id;
+XBT_PUBLIC_DATA short int surfxml_trace___connect_trace_isset;
+XBT_PUBLIC_DATA AT_surfxml_zone_id AX_surfxml_zone_id;
 #define A_surfxml_zone_id (surfxml_bufferstack + AX_surfxml_zone_id)
-XBT_PUBLIC_DATA(short int) surfxml_zone_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zone_routing) AX_surfxml_zone_routing;
+XBT_PUBLIC_DATA short int surfxml_zone_id_isset;
+XBT_PUBLIC_DATA AT_surfxml_zone_routing AX_surfxml_zone_routing;
 #define A_surfxml_zone_routing AX_surfxml_zone_routing
-XBT_PUBLIC_DATA(short int) surfxml_zone_routing_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zoneRoute_dst) AX_surfxml_zoneRoute_dst;
+XBT_PUBLIC_DATA short int surfxml_zone_routing_isset;
+XBT_PUBLIC_DATA AT_surfxml_zoneRoute_dst AX_surfxml_zoneRoute_dst;
 #define A_surfxml_zoneRoute_dst (surfxml_bufferstack + AX_surfxml_zoneRoute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_zoneRoute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zoneRoute_gw___dst) AX_surfxml_zoneRoute_gw___dst;
+XBT_PUBLIC_DATA short int surfxml_zoneRoute_dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_zoneRoute_gw___dst AX_surfxml_zoneRoute_gw___dst;
 #define A_surfxml_zoneRoute_gw___dst (surfxml_bufferstack + AX_surfxml_zoneRoute_gw___dst)
-XBT_PUBLIC_DATA(short int) surfxml_zoneRoute_gw___dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zoneRoute_gw___src) AX_surfxml_zoneRoute_gw___src;
+XBT_PUBLIC_DATA short int surfxml_zoneRoute_gw___dst_isset;
+XBT_PUBLIC_DATA AT_surfxml_zoneRoute_gw___src AX_surfxml_zoneRoute_gw___src;
 #define A_surfxml_zoneRoute_gw___src (surfxml_bufferstack + AX_surfxml_zoneRoute_gw___src)
-XBT_PUBLIC_DATA(short int) surfxml_zoneRoute_gw___src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zoneRoute_src) AX_surfxml_zoneRoute_src;
+XBT_PUBLIC_DATA short int surfxml_zoneRoute_gw___src_isset;
+XBT_PUBLIC_DATA AT_surfxml_zoneRoute_src AX_surfxml_zoneRoute_src;
 #define A_surfxml_zoneRoute_src (surfxml_bufferstack + AX_surfxml_zoneRoute_src)
-XBT_PUBLIC_DATA(short int) surfxml_zoneRoute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_zoneRoute_symmetrical) AX_surfxml_zoneRoute_symmetrical;
+XBT_PUBLIC_DATA short int surfxml_zoneRoute_src_isset;
+XBT_PUBLIC_DATA AT_surfxml_zoneRoute_symmetrical AX_surfxml_zoneRoute_symmetrical;
 #define A_surfxml_zoneRoute_symmetrical AX_surfxml_zoneRoute_symmetrical
-XBT_PUBLIC_DATA(short int) surfxml_zoneRoute_symmetrical_isset;
+XBT_PUBLIC_DATA short int surfxml_zoneRoute_symmetrical_isset;
 
 /* XML application utilities. */
-XBT_PUBLIC(int) surfxml_element_context(int);
+XBT_PUBLIC int surfxml_element_context(int);
 
 /* XML processor entry point. */
-XBT_PUBLIC(int) yylex(void);
+XBT_PUBLIC int yylex(void);
 
 /* Flexml error handling function (useful only when -q flag passed to flexml) */
 const char * surfxml_parse_err_msg(void);
index 9fde6ed..377992a 100644 (file)
@@ -1,6 +1,6 @@
 /* automaton - representation of büchi automaton */
 
-/* Copyright (c) 2011-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2011-2018. 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. */
@@ -212,7 +212,9 @@ static int call_simple_function(void* function)
   return ((int (*)(void)) function)();
 }
 
-xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_automaton_t a, const char* id, int(*fct)(void)){
+xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_automaton_t a, const char* id,
+                                                                            int (*fct)(void))
+{
   xbt_automaton_propositional_symbol_t prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
   prop_symb->pred = xbt_strdup(id);
   prop_symb->callback                            = &call_simple_function;
@@ -222,7 +224,9 @@ xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new(xbt_
   return prop_symb;
 }
 
-XBT_PUBLIC(xbt_automaton_propositional_symbol_t) xbt_automaton_propositional_symbol_new_pointer(xbt_automaton_t a, const char* id, int* value)
+XBT_PUBLIC xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new_pointer(xbt_automaton_t a,
+                                                                                               const char* id,
+                                                                                               int* value)
 {
   xbt_automaton_propositional_symbol_t prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
   prop_symb->pred = xbt_strdup(id);
@@ -233,10 +237,9 @@ XBT_PUBLIC(xbt_automaton_propositional_symbol_t) xbt_automaton_propositional_sym
   return prop_symb;
 }
 
-XBT_PUBLIC(xbt_automaton_propositional_symbol_t) xbt_automaton_propositional_symbol_new_callback(
-  xbt_automaton_t a, const char* id,
-  xbt_automaton_propositional_symbol_callback_type callback,
-  void* data, xbt_automaton_propositional_symbol_free_function_type free_function)
+XBT_PUBLIC xbt_automaton_propositional_symbol_t xbt_automaton_propositional_symbol_new_callback(
+    xbt_automaton_t a, const char* id, xbt_automaton_propositional_symbol_callback_type callback, void* data,
+    xbt_automaton_propositional_symbol_free_function_type free_function)
 {
   xbt_automaton_propositional_symbol_t prop_symb = xbt_new0(struct xbt_automaton_propositional_symbol, 1);
   prop_symb->pred = xbt_strdup(id);
@@ -247,7 +250,7 @@ XBT_PUBLIC(xbt_automaton_propositional_symbol_t) xbt_automaton_propositional_sym
   return prop_symb;
 }
 
-XBT_PUBLIC(int) xbt_automaton_propositional_symbol_evaluate(xbt_automaton_propositional_symbol_t symbol)
+XBT_PUBLIC int xbt_automaton_propositional_symbol_evaluate(xbt_automaton_propositional_symbol_t symbol)
 {
   if (symbol->callback)
     return (symbol->callback)(symbol->data);
@@ -255,17 +258,18 @@ XBT_PUBLIC(int) xbt_automaton_propositional_symbol_evaluate(xbt_automaton_propos
     return *(int*) symbol->data;
 }
 
-XBT_PUBLIC(xbt_automaton_propositional_symbol_callback_type) xbt_automaton_propositional_symbol_get_callback(xbt_automaton_propositional_symbol_t symbol)
+XBT_PUBLIC xbt_automaton_propositional_symbol_callback_type
+xbt_automaton_propositional_symbol_get_callback(xbt_automaton_propositional_symbol_t symbol)
 {
   return symbol->callback;
 }
 
-XBT_PUBLIC(void*) xbt_automaton_propositional_symbol_get_data(xbt_automaton_propositional_symbol_t symbol)
+XBT_PUBLIC void* xbt_automaton_propositional_symbol_get_data(xbt_automaton_propositional_symbol_t symbol)
 {
   return symbol->data;
 }
 
-XBT_PUBLIC(const char*) xbt_automaton_propositional_symbol_get_name(xbt_automaton_propositional_symbol_t symbol)
+XBT_PUBLIC const char* xbt_automaton_propositional_symbol_get_name(xbt_automaton_propositional_symbol_t symbol)
 {
   return symbol->pred;
 }
index cb26929..5ca3c34 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.     */
+/* Copyright (c) 2004-2018. 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. */
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
 
-XBT_EXPORT_NO_IMPORT(xbt_cfg_t) simgrid_config = nullptr;
-extern "C" {
-  XBT_PUBLIC(void) sg_config_finalize();
-}
+XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr;
+extern "C" XBT_PUBLIC void sg_config_finalize();
 
 namespace simgrid {
 namespace config {
@@ -379,16 +377,15 @@ void Config::help()
 
 // ***** getConfig *****
 
-template<class T>
-XBT_PUBLIC(T const&) getConfig(const char* name)
+template <class T> XBT_PUBLIC T const& getConfig(const char* name)
 {
   return (*simgrid_config)[name].getValue<T>();
 }
 
-template XBT_PUBLIC(int const&) getConfig<int>(const char* name);
-template XBT_PUBLIC(double const&) getConfig<double>(const char* name);
-template XBT_PUBLIC(bool const&) getConfig<bool>(const char* name);
-template XBT_PUBLIC(std::string const&) getConfig<std::string>(const char* name);
+template XBT_PUBLIC int const& getConfig<int>(const char* name);
+template XBT_PUBLIC double const& getConfig<double>(const char* name);
+template XBT_PUBLIC bool const& getConfig<bool>(const char* name);
+template XBT_PUBLIC std::string const& getConfig<std::string>(const char* name);
 
 // ***** alias *****
 
@@ -399,9 +396,8 @@ void alias(const char* realname, const char* aliasname)
 
 // ***** declareFlag *****
 
-template<class T>
-XBT_PUBLIC(void) declareFlag(const char* name, const char* description,
-  T value, std::function<void(const T&)> callback)
+template <class T>
+XBT_PUBLIC void declareFlag(const char* name, const char* description, T value, std::function<void(const T&)> callback)
 {
   if (simgrid_config == nullptr) {
     simgrid_config = xbt_cfg_new();
@@ -411,15 +407,14 @@ XBT_PUBLIC(void) declareFlag(const char* name, const char* description,
     name, description, std::move(value), std::move(callback));
 }
 
-template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, int value, std::function<void(int const &)> callback);
-template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, double value, std::function<void(double const &)> callback);
-template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, bool value, std::function<void(bool const &)> callback);
-template XBT_PUBLIC(void) declareFlag(const char* name,
-  const char* description, std::string value, std::function<void(std::string const &)> callback);
-
+template XBT_PUBLIC void declareFlag(const char* name, const char* description, int value,
+                                     std::function<void(int const&)> callback);
+template XBT_PUBLIC void declareFlag(const char* name, const char* description, double value,
+                                     std::function<void(double const&)> callback);
+template XBT_PUBLIC void declareFlag(const char* name, const char* description, bool value,
+                                     std::function<void(bool const&)> callback);
+template XBT_PUBLIC void declareFlag(const char* name, const char* description, std::string value,
+                                     std::function<void(std::string const&)> callback);
 }
 }
 
@@ -765,7 +760,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_cfg);
 
 XBT_TEST_SUITE("config", "Configuration support");
 
-XBT_PUBLIC_DATA(xbt_cfg_t) simgrid_config;
+XBT_PUBLIC_DATA xbt_cfg_t simgrid_config;
 
 static void make_set()
 {
index c6a637c..2d11645 100644 (file)
@@ -444,7 +444,7 @@ extern "C" unsigned int xbt_dynar_search(xbt_dynar_t const dynar, void* const el
     }
 
   THROWF(not_found_error, 0, "Element %p not part of dynar %p", elem, dynar);
-  return -1; // Won't happen, just to please eclipse
+  return 0; // Won't happen, just to please eclipse
 }
 
 /** @brief Returns the position of the element in the dynar (or -1 if not found)
index c439569..c35a90e 100644 (file)
@@ -1,45 +1,9 @@
 /* ex - Exception Handling                                                  */
 
-/* Copyright (c) 2005-2017. The SimGrid Team. All rights reserved.          */
-
-/*  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>       */
-/*  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>         */
-/*  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>           */
-/*  All rights reserved.                                                    */
-
-/* This code is inspirated from the OSSP version (as retrieved back in 2004)*/
-/* It was heavily modified to fit the SimGrid framework.                    */
-
-/* The OSSP version has the following copyright notice:
-**  OSSP ex - Exception Handling
-**  Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com>
-**  Copyright (c) 2002-2004 The OSSP Project <http://www.ossp.org/>
-**  Copyright (c) 2002-2004 Cable & Wireless <http://www.cw.com/>
-**
-**  This file is part of OSSP ex, an exception handling library
-**  which can be found at http://www.ossp.org/pkg/lib/ex/.
-**
-**  Permission to use, copy, modify, and distribute this software for
-**  any purpose with or without fee is hereby granted, provided that
-**  the above copyright notice and this permission notice appear in all
-**  copies.
-**
-**  THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESSED OR IMPLIED
-**  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-**  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-**  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
-**  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-**  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-**  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-**  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-**  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-**  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-**  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-**  SUCH DAMAGE.
- */
-
-/* The extensions made for the SimGrid project can either be distributed    */
-/* under the same license, or under the LGPL v2.1                           */
+/* Copyright (c) 2005-2018. 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 <cstdio>
 #include <cstdlib>
index 7946e17..e5095be 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
@@ -26,6 +26,6 @@ struct xbt_log_layout_s {
  *
  * Programatically alter a category's parent (don't use).
  */
-XBT_PUBLIC(void) xbt_log_parent_set(xbt_log_category_t cat, xbt_log_category_t parent);
+XBT_PUBLIC void xbt_log_parent_set(xbt_log_category_t cat, xbt_log_category_t parent);
 
 #endif
index 640e09f..4854410 100644 (file)
@@ -277,13 +277,13 @@ struct mdesc {
 
 /* A default malloc descriptor for the single sbrk() managed region. */
 
-XBT_PUBLIC_DATA( struct mdesc ) *__mmalloc_default_mdp;
+XBT_PUBLIC_DATA struct mdesc* __mmalloc_default_mdp;
 
 /* Remap a mmalloc region that was previously mapped. */
 
-XBT_PUBLIC( void *)__mmalloc_remap_core(xbt_mheap_t mdp);
+XBT_PUBLIC void* __mmalloc_remap_core(xbt_mheap_t mdp);
 
-XBT_PUBLIC( void *)mmorecore(struct mdesc *mdp, ssize_t size);
+XBT_PUBLIC void* mmorecore(struct mdesc* mdp, ssize_t size);
 
 /** Thread-safety (if the mutex is already created)
  *
index be1e9de..c3be30e 100644 (file)
@@ -10,7 +10,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example")
 static void worker()
 {
   simgrid::s4u::this_actor::sleep_for(.5);
-  XBT_INFO("Worker started (PID:%lu, PPID:%lu)", simgrid::s4u::this_actor::getPid(),
+  XBT_INFO("Worker started (PID:%ld, PPID:%ld)", simgrid::s4u::this_actor::getPid(),
            simgrid::s4u::this_actor::getPpid());
   while (1) {
     XBT_INFO("Plop i am %ssuspended", simgrid::s4u::this_actor::isSuspended() ? "" : "not ");
@@ -26,7 +26,7 @@ static void master()
   simgrid::s4u::this_actor::getHost()->actorList(actor_list);
 
   for (auto const& actor : *actor_list) {
-    XBT_INFO("Actor (pid=%lu, ppid=%lu, name=%s)", actor->getPid(), actor->getPpid(), actor->getCname());
+    XBT_INFO("Actor (pid=%ld, ppid=%ld, name=%s)", actor->getPid(), actor->getPpid(), actor->getCname());
     if (simgrid::s4u::this_actor::getPid() != actor->getPid())
       actor->kill();
   }
@@ -35,16 +35,16 @@ static void master()
       simgrid::s4u::Actor::createActor("worker from master", simgrid::s4u::this_actor::getHost(), worker);
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Suspend Actor (pid=%lu)", actor->getPid());
+  XBT_INFO("Suspend Actor (pid=%ld)", actor->getPid());
   actor->suspend();
 
-  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
+  XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
   simgrid::s4u::this_actor::sleep_for(2);
 
-  XBT_INFO("Resume Actor (pid=%lu)", actor->getPid());
+  XBT_INFO("Resume Actor (pid=%ld)", actor->getPid());
   actor->resume();
 
-  XBT_INFO("Actor (pid=%lu) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
+  XBT_INFO("Actor (pid=%ld) is %ssuspended", actor->getPid(), actor->isSuspended() ? "" : "not ");
   simgrid::s4u::this_actor::sleep_for(2);
   actor->kill();
 
index 552f17c..69b7ff8 100644 (file)
@@ -42,10 +42,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Engine e(&argc, argv);
   e.loadPlatform(argv[1]);
 
-  if (argc > 2)
-    simgrid::s4u::Actor::killAll(atoi(argv[2]));
-  else
-    simgrid::s4u::Actor::killAll();
+  simgrid::s4u::Actor::killAll();
 
   simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
   simgrid::s4u::Actor::createActor("sendpid", simgrid::s4u::Host::by_name("Tremblay"), sendpid);
index 2c2c1ca..86011db 100644 (file)
@@ -11,17 +11,3 @@ $ ./pid ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
 > [  0.001206] (sendpid@Tremblay) Send of pid "3" done.
 > [  0.001206] (killall@Tremblay) Killing process "3".
 > [  0.001206] (sendpid@Tremblay) Process "3" killed.
-
-$ ./pid ${platfdir}/small_platform.xml 2 "--log=root.fmt:[%10.6r]%e(%P@%h)%e%m%n"
-> [  0.000000] (sendpid@Tremblay) Sending pid of "2".
-> [  0.000000] (sendpid@Tremblay) Sending pid of "3".
-> [  0.000000] (sendpid@Tremblay) Sending pid of "4".
-> [  0.000402] (killall@Tremblay) Killing process "2".
-> [  0.000402] (sendpid@Tremblay) Send of pid "2" done.
-> [  0.000402] (sendpid@Tremblay) Process "2" killed.
-> [  0.000804] (sendpid@Tremblay) Send of pid "3" done.
-> [  0.000804] (killall@Tremblay) Killing process "3".
-> [  0.000804] (sendpid@Tremblay) Process "3" killed.
-> [  0.001206] (sendpid@Tremblay) Send of pid "4" done.
-> [  0.001206] (killall@Tremblay) Killing process "4".
-> [  0.001206] (sendpid@Tremblay) Process "4" killed.
index 3426e6b..01cb653 100644 (file)
@@ -90,14 +90,12 @@ static void get_set_storage_data(const std::string& storage_name)
 
 static void dump_platform_storages()
 {
-  std::map<std::string, simgrid::s4u::Storage*>* storages = new std::map<std::string, simgrid::s4u::Storage*>;
-  simgrid::s4u::getStorageList(storages);
+  std::vector<simgrid::s4u::Storage*> storages = simgrid::s4u::Engine::getInstance()->getAllStorages();
 
-  for (auto const& storage : *storages) {
-    XBT_INFO("Storage %s is attached to %s", storage.first.c_str(), storage.second->getHost()->getCname());
-    storage.second->setProperty("other usage", "gpfs");
+  for (auto const& s : storages) {
+    XBT_INFO("Storage %s is attached to %s", s->getCname(), s->getHost()->getCname());
+    s->setProperty("other usage", "gpfs");
   }
-  delete storages;
 }
 
 static void storage_info(simgrid::s4u::Host* host)
index 553c2db..0ab6f41 100644 (file)
@@ -13,8 +13,6 @@
 
 #define ERROR_MARGIN 0.5
 
-static int verbose = 0;
-
 int main(int argc, char *argv[])
 {
     char *sbuf, *rbuf;
@@ -27,9 +25,6 @@ int main(int argc, char *argv[])
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     MPI_Comm_size(MPI_COMM_WORLD, &size);
 
-    if (getenv("MPITEST_VERBOSE"))
-        verbose = 1;
-
     /* Allocate memory regions to communicate */
     sbuf = (char *) malloc(SIZE);
     rbuf = (char *) malloc(size * SIZE);
index 2cae007..8976b75 100644 (file)
@@ -11,8 +11,6 @@
 #endif
 #include "mpi.h"
 
-static int verbose = 0;
-
 int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 
@@ -74,12 +72,10 @@ int parse_args(int argc, char **argv)
      * {
      * switch (ret) {
      * case 'v':
-     * verbose = 1;
+     * verbose = 1; <-- never used, thus removed
      * break;
      * }
      * }
      */
-    if (argc > 1 && strcmp(argv[1], "-v") == 0)
-        verbose = 1;
     return 0;
 }
index 8b4b980..b147dbf 100644 (file)
@@ -24,6 +24,12 @@ if(enable_compile_warnings)
   if(CMAKE_COMPILER_IS_GNUCC)
     set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered  -Wno-unused-local-typedefs -Wno-error=attributes")
   endif()
+  if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+    # ignore remark  #1418: external function definition with no prior declaration
+    # 3179: deprecated conversion of string literal to char* (should be const char*)
+    # 191: type qualifier is meaningless on cast type
+    set(warnCFLAGS "${warnCFLAGS} -wd1418 -wd191 -wd3179")
+  endif()
 
   set(warnCXXFLAGS "${warnCFLAGS} -Wall -Wextra -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing")
   if(CMAKE_COMPILER_IS_GNUCXX AND (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")))
index 14a4c81..e279ee1 100644 (file)
@@ -157,8 +157,8 @@ if(enable_maintainer_mode AND NOT WIN32)
 
     ENDIF()
 
-    set(string1  "'s/extern *\\([^(]*\\)\\( \\|\\( \\*\\)\\)/XBT_PUBLIC_DATA(\\1\\3) /'")
-    set(string2  "'s/XBT_PUBLIC_DATA(\\([^)]*\\)) *\\([^(]*\\)(/XBT_PUBLIC(\\1) \\2(/'")
+    set(string1  "'s/extern /XBT_PUBLIC_DATA /'")
+    set(string2  "'s/XBT_PUBLIC_DATA \\([^(]*\\)(/XBT_PUBLIC \\1(/'")
     set(string5  "'s/SET(DOCTYPE)/SET(ROOT_dax__adag)/'")
     set(string9  "'s/#include <unistd.h>/#if defined(_WIN32)\\n#  ifndef __STRICT_ANSI__\\n#    include <io.h>\\n#    include <process.h>\\n#  endif\\n#else\\n#  include <unistd.h>\\n#endif/g'")
     set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'")