From: Martin Quinson Date: Sun, 30 Apr 2017 21:14:07 +0000 (+0200) Subject: uppercase the s4u header files (+cleanups) X-Git-Tag: v3.16~300 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f1e469ce075c0a1ad21a7fd0fdb587f9a3cb5289?ds=sidebyside uppercase the s4u header files (+cleanups) --- diff --git a/include/simgrid/s4u.hpp b/include/simgrid/s4u.hpp index 0da7c98f6e..b4a1a64859 100644 --- a/include/simgrid/s4u.hpp +++ b/include/simgrid/s4u.hpp @@ -8,15 +8,15 @@ #include #include +#include +#include #include -#include -#include +#include #include #include -#include -#include -#include +#include +#include #endif /* SIMGRID_S4U_S4U_H */ diff --git a/include/simgrid/s4u/comm.hpp b/include/simgrid/s4u/Comm.hpp similarity index 72% rename from include/simgrid/s4u/comm.hpp rename to include/simgrid/s4u/Comm.hpp index 239755eefb..2a49c55e15 100644 --- a/include/simgrid/s4u/comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -8,31 +8,30 @@ #include +#include #include #include -#include - namespace simgrid { namespace s4u { - /** @brief Communication async * * Represents all asynchronous communications, that you can test or wait onto. */ -XBT_PUBLIC_CLASS Comm : public Activity { +XBT_PUBLIC_CLASS Comm : public Activity +{ Comm() : Activity() {} public: ~Comm() override; - /*! take a range of s4u::Comm* (last excluded) and return when one of them is finished. The return value is an iterator on the finished Comms. */ - template static - I wait_any(I first, I last) + /*! take a range of s4u::Comm* (last excluded) and return when one of them is finished. The return value is an + * iterator on the finished Comms. */ + template static I wait_any(I first, I last) { // Map to dynar: xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL); - for(I iter = first; iter != last; iter++) { + for (I iter = first; iter != last; iter++) { Comm& comm = **iter; if (comm.state_ == inited) comm.start(); @@ -46,17 +45,16 @@ public: if (idx == -1) return last; // Lift the index to the corresponding iterator: - auto res = std::next(first, idx); + auto res = std::next(first, idx); (*res)->state_ = finished; return res; } /*! Same as wait_any, but with a timeout. If wait_any_for return because of the timeout last is returned.*/ - template static - I wait_any_for(I first, I last, double timeout) + template static I wait_any_for(I first, I last, double timeout) { // Map to dynar: xbt_dynar_t comms = xbt_dynar_new(sizeof(simgrid::kernel::activity::ActivityImpl*), NULL); - for(I iter = first; iter != last; iter++) { + for (I iter = first; iter != last; iter++) { Comm& comm = **iter; if (comm.state_ == inited) comm.start(); @@ -70,18 +68,18 @@ public: if (idx == -1) return last; // Lift the index to the corresponding iterator: - auto res = std::next(first, idx); + auto res = std::next(first, idx); (*res)->state_ = finished; return res; } /** Creates (but don't start) an async send to the mailbox @p dest */ - static Comm &send_init(MailboxPtr dest); + static Comm& send_init(MailboxPtr dest); /** Creates and start an async send to the mailbox @p dest */ - static Comm &send_async(MailboxPtr dest, void *data, int simulatedByteAmount); - /** Creates (but don't start) an async recv onto the mailbox @p from */ - static Comm &recv_init(MailboxPtr from); + static Comm& send_async(MailboxPtr dest, void* data, int simulatedByteAmount); + /** Creates (but don't start) an async recv onto the mailbox @p from */ + static Comm& recv_init(MailboxPtr from); /** Creates and start an async recv to the mailbox @p from */ - static Comm &recv_async(MailboxPtr from, void **data); + static Comm& recv_async(MailboxPtr from, void** data); void start() override; void wait() override; @@ -91,40 +89,39 @@ public: void setRate(double rate); /** Specify the data to send */ - void setSrcData(void * buff); + void setSrcData(void* buff); /** Specify the size of the data to send */ void setSrcDataSize(size_t size); /** Specify the data to send and its size */ - void setSrcData(void * buff, size_t size); + void setSrcData(void* buff, size_t size); /** Specify where to receive the data */ - void setDstData(void ** buff); + void setDstData(void** buff); /** Specify the buffer in which the data should be received */ - void setDstData(void ** buff, size_t size); + void setDstData(void** buff, size_t size); /** Retrieve the size of the received data */ size_t getDstDataSize(); bool test(); - private: - double rate_ = -1; - void *dstBuff_ = nullptr; + double rate_ = -1; + void* dstBuff_ = nullptr; size_t dstBuffSize_ = 0; - void *srcBuff_ = nullptr; + void* srcBuff_ = nullptr; size_t srcBuffSize_ = sizeof(void*); /* FIXME: expose these elements in the API */ int detached_ = 0; - int (*matchFunction_)(void *, void *, smx_activity_t) = nullptr; - void (*cleanFunction_)(void *) = nullptr; + int (*matchFunction_)(void*, void*, smx_activity_t) = nullptr; + void (*cleanFunction_)(void*) = nullptr; void (*copyDataFunction_)(smx_activity_t, void*, size_t) = nullptr; - smx_actor_t sender_ = nullptr; + smx_actor_t sender_ = nullptr; smx_actor_t receiver_ = nullptr; - MailboxPtr mailbox_ = nullptr; + MailboxPtr mailbox_ = nullptr; }; - -}} // namespace simgrid::s4u +} +} // namespace simgrid::s4u #endif /* SIMGRID_S4U_COMM_HPP */ diff --git a/include/simgrid/s4u/engine.hpp b/include/simgrid/s4u/Engine.hpp similarity index 84% rename from include/simgrid/s4u/engine.hpp rename to include/simgrid/s4u/Engine.hpp index ea09d3e690..9aab4fe0fa 100644 --- a/include/simgrid/s4u/engine.hpp +++ b/include/simgrid/s4u/Engine.hpp @@ -26,13 +26,14 @@ namespace s4u { * * This class is an interface to the simulation engine. */ -XBT_PUBLIC_CLASS Engine { +XBT_PUBLIC_CLASS Engine +{ private: ~Engine(); public: /** Constructor, taking the command line parameters of your main function */ - Engine(int *argc, char **argv); + Engine(int* argc, char** argv); /** Finalize the default engine and all its dependencies */ static void shutdown(); @@ -42,20 +43,20 @@ public: * The environment is either a XML file following the simgrid.dtd formalism, or a lua file. * Some examples can be found in the directory examples/platforms. */ - void loadPlatform(const char *platf); + void loadPlatform(const char* platf); /** Registers the main function of an actor that will be launched from the deployment file */ - void registerFunction(const char*name, int (*code)(int,char**)); + void registerFunction(const char* name, int (*code)(int, char**)); /** Registers a function as the default main function of actors * * It will be used as fallback when the function requested from the deployment file was not registered. * It is used for trace-based simulations (see examples/msg/actions). */ - void registerDefault(int (*code)(int,char**)); + void registerDefault(int (*code)(int, char**)); /** @brief Load a deployment file and launch the actors that it contains */ - void loadDeployment(const char *deploy); + void loadDeployment(const char* deploy); size_t hostCount(); void hostList(std::vector * whereTo); @@ -65,9 +66,9 @@ public: /** @brief Retrieve the simulation time */ static double getClock(); - + /** @brief Retrieve the engine singleton */ - static s4u::Engine *instance(); + static s4u::Engine* instance(); /** @brief Retrieve the root netzone, containing all others */ simgrid::s4u::NetZone* netRoot(); @@ -81,10 +82,9 @@ public: void netpointRegister(simgrid::kernel::routing::NetPoint * card); void netpointUnregister(simgrid::kernel::routing::NetPoint * card); - template - void registerFunction(const char* name) + template void registerFunction(const char* name) { - simgrid::simix::registerFunction(name, [](std::vector args){ + simgrid::simix::registerFunction(name, [](std::vector args) { return simgrid::simix::ActorCode([args] { F code(std::move(args)); code(); @@ -92,13 +92,10 @@ public: }); } - template - void registerFunction(const char* name, F code) + template void registerFunction(const char* name, F code) { - simgrid::simix::registerFunction(name, [code](std::vector args){ - return simgrid::simix::ActorCode([code,args] { - code(std::move(args)); - }); + simgrid::simix::registerFunction(name, [code](std::vector args) { + return simgrid::simix::ActorCode([code, args] { code(std::move(args)); }); }); } @@ -108,7 +105,7 @@ public: simgrid::kernel::EngineImpl* pimpl; private: - static s4u::Engine *instance_; + static s4u::Engine* instance_; }; /** Callback fired when the platform is created (ie, the xml file parsed), @@ -120,6 +117,7 @@ extern XBT_PRIVATE xbt::signal onSimulationEnd; /** Callback fired when the time jumps into the future */ extern XBT_PRIVATE xbt::signal onTimeAdvance; -}} // namespace simgrid::s4u +} +} // namespace simgrid::s4u #endif /* SIMGRID_S4U_ENGINE_HPP */ diff --git a/include/simgrid/s4u/file.hpp b/include/simgrid/s4u/File.hpp similarity index 84% rename from include/simgrid/s4u/file.hpp rename to include/simgrid/s4u/File.hpp index 1c552d1fe5..d9d0080ab1 100644 --- a/include/simgrid/s4u/file.hpp +++ b/include/simgrid/s4u/File.hpp @@ -19,16 +19,18 @@ class Storage; * * Used to simulate the time it takes to access to a file, but does not really store any information. * - * They are located on @ref simgrid::s4u::Storage that are accessed from a given @ref simgrid::s4u::Host through mountpoints. + * They are located on @ref simgrid::s4u::Storage that are accessed from a given @ref simgrid::s4u::Host through + * mountpoints. * For now, you cannot change the mountpoints programatically, and must declare them from your platform file. */ -XBT_PUBLIC_CLASS File { +XBT_PUBLIC_CLASS File +{ public: - File(const char *fullpath, void* userdata); + File(const char* fullpath, void* userdata); ~File(); /** Retrieves the path to the file */ - const char *path() { return path_;} + const char* path() { return path_; } /** Simulates a read action. Returns the size of data actually read * @@ -44,9 +46,9 @@ public: sg_size_t write(sg_size_t size); /** Allows to store user data on that host */ - void setUserdata(void *data) {userdata_ = data;} + void setUserdata(void* data) { userdata_ = data; } /** Retrieves the previously stored data */ - void* userdata() {return userdata_;} + void* userdata() { return userdata_; } /** Retrieve the datasize */ sg_size_t size(); @@ -59,7 +61,7 @@ public: /** Rename a file * * WARNING: It is forbidden to move the file to another mount point */ - void move(const char*fullpath); + void move(const char* fullpath); /** Remove a file from disk */ void unlink(); @@ -72,10 +74,10 @@ public: private: smx_file_t pimpl_ = nullptr; - const char *path_ = nullptr; - void *userdata_ = nullptr; + const char* path_ = nullptr; + void* userdata_ = nullptr; }; - -}} // namespace simgrid::s4u +} +} // namespace simgrid::s4u #endif /* SIMGRID_S4U_HOST_HPP */ diff --git a/include/simgrid/s4u/host.hpp b/include/simgrid/s4u/Host.hpp similarity index 87% rename from include/simgrid/s4u/host.hpp rename to include/simgrid/s4u/Host.hpp index 189031a69e..999098f3eb 100644 --- a/include/simgrid/s4u/host.hpp +++ b/include/simgrid/s4u/Host.hpp @@ -22,13 +22,13 @@ namespace simgrid { namespace xbt { - extern template class XBT_PUBLIC() Extendable; +extern template class XBT_PUBLIC() Extendable; } namespace s4u { /** @ingroup s4u_api * - * @tableofcontents + * @tableofcontents * * An host represents some physical resource with computing and networking capabilities. * @@ -39,11 +39,11 @@ 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 { +XBT_PUBLIC_CLASS Host : public simgrid::xbt::Extendable +{ public: - explicit Host(const char *name); + explicit Host(const char* name); /** Host destruction logic */ protected: @@ -51,6 +51,7 @@ protected: private: bool currentlyDestroying_ = false; + public: void destroy(); // No copy/move @@ -62,9 +63,9 @@ public: /** Retrieves an host from its name, or return nullptr */ static Host* by_name_or_null(std::string name); /** Retrieves an host from its name, or die */ - static s4u::Host *by_name(std::string name); + static s4u::Host* by_name(std::string name); /** Retrieves the host on which the current actor is running */ - static s4u::Host *current(); + static s4u::Host* current(); simgrid::xbt::string const& name() const { return name_; } const char* cname() { return name_.c_str(); } @@ -87,9 +88,9 @@ public: double speed(); int coreCount(); xbt_dict_t properties(); - const char*property(const char*key); - void setProperty(const char*key, const char *value); - void processes(std::vector* list); + const char* property(const char* key); + void setProperty(const char* key, const char* value); + void processes(std::vector * list); double getPstateSpeed(int pstate_index); int pstatesCount() const; void setPstate(int pstate_index); @@ -101,20 +102,20 @@ public: * * This is defined in the platform file, and cannot be modified programatically (yet). */ - boost::unordered_map const &mountedStorages(); + boost::unordered_map const& mountedStorages(); void routeTo(Host * dest, std::vector * links, double* latency); void routeTo(Host * dest, std::vector * links, double* latency); private: simgrid::xbt::string name_ = "noname"; - boost::unordered_map *mounts = nullptr; // caching + boost::unordered_map* mounts = nullptr; // caching public: // TODO, this could be a unique_ptr surf::HostImpl* pimpl_ = nullptr; /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */ - surf::Cpu *pimpl_cpu = nullptr; + surf::Cpu* pimpl_cpu = nullptr; /** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */ kernel::routing::NetPoint* pimpl_netpoint = nullptr; @@ -128,8 +129,8 @@ public: * (either because of a pstate switch or because of an external load event coming from the profile) */ static simgrid::xbt::signal onSpeedChange; }; - -}} // namespace simgrid::s4u +} +} // namespace simgrid::s4u extern int USER_HOST_LEVEL; @@ -148,5 +149,5 @@ public class Host { public native int getLoad(); -} +} #endif diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index bd0a479215..62c36fdd59 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ diff --git a/include/simgrid/s4u/storage.hpp b/include/simgrid/s4u/Storage.hpp similarity index 88% rename from include/simgrid/s4u/storage.hpp rename to include/simgrid/s4u/Storage.hpp index 79f6ac522e..305bbba87d 100644 --- a/include/simgrid/s4u/storage.hpp +++ b/include/simgrid/s4u/Storage.hpp @@ -17,7 +17,8 @@ namespace simgrid { namespace s4u { -XBT_PUBLIC_CLASS Storage { +XBT_PUBLIC_CLASS Storage +{ friend s4u::Engine; Storage(std::string name, smx_storage_t inferior); @@ -26,8 +27,8 @@ public: Storage() = default; virtual ~Storage(); /** Retrieve a Storage by its name. It must exist in the platform file */ - static Storage &byName(const char* name); - const char *name(); + static Storage& byName(const char* name); + const char* name(); const char* host(); sg_size_t sizeFree(); sg_size_t sizeUsed(); @@ -43,9 +44,9 @@ protected: smx_storage_t inferior(); public: - void setUserdata(void *data) {userdata_ = data;} - void *userdata() {return userdata_;} - + void setUserdata(void* data) { userdata_ = data; } + void* userdata() { return userdata_; } + private: static std::unordered_map* storages_; diff --git a/include/simgrid/s4u/VirtualMachine.hpp b/include/simgrid/s4u/VirtualMachine.hpp index 0d3c791103..2085fae28a 100644 --- a/include/simgrid/s4u/VirtualMachine.hpp +++ b/include/simgrid/s4u/VirtualMachine.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,8 +7,8 @@ #define SIMGRID_S4U_VM_HPP #include "simgrid/datatypes.h" +#include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/forward.hpp" -#include "simgrid/s4u/host.hpp" typedef enum { SURF_VM_STATE_CREATED, /**< created, but not yet started */ diff --git a/src/instr/instr_paje_containers.cpp b/src/instr/instr_paje_containers.cpp index 87edfbe8e0..7a98c744aa 100644 --- a/src/instr/instr_paje_containers.cpp +++ b/src/instr/instr_paje_containers.cpp @@ -1,18 +1,12 @@ -/* Copyright (c) 2010, 2012-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" -#include -#include -#include - -#include -#include +#include "surf/surf.h" #include "src/instr/instr_private.h" diff --git a/src/instr/jedule/jedule_sd_binding.cpp b/src/instr/jedule/jedule_sd_binding.cpp index 4206fdb918..782bb6e0e8 100644 --- a/src/instr/jedule/jedule_sd_binding.cpp +++ b/src/instr/jedule/jedule_sd_binding.cpp @@ -1,18 +1,15 @@ -/* Copyright (c) 2010-2016. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "xbt/asserts.h" #include "simgrid/jedule/jedule_sd_binding.h" -#include "simgrid/forward.h" - -#include "../../simdag/simdag_private.hpp" #include "simgrid/jedule/jedule.hpp" +#include "src/simdag/simdag_private.hpp" + +#include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/NetZone.hpp" -#include "simgrid/s4u/engine.hpp" #if HAVE_JEDULE diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index 3375539c53..1760dcf3f7 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -4,9 +4,9 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/EngineImpl.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/kernel/routing/NetZoneImpl.hpp" -#include namespace simgrid { namespace kernel { diff --git a/src/kernel/activity/SynchroExec.cpp b/src/kernel/activity/SynchroExec.cpp index a9d0656256..5528f864fa 100644 --- a/src/kernel/activity/SynchroExec.cpp +++ b/src/kernel/activity/SynchroExec.cpp @@ -1,9 +1,9 @@ -/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include +#include "simgrid/s4u/Host.hpp" #include "src/kernel/activity/SynchroExec.hpp" #include "src/surf/surf_interface.hpp" diff --git a/src/kernel/activity/SynchroSleep.cpp b/src/kernel/activity/SynchroSleep.cpp index 9fe6be34dc..a2f281efa9 100644 --- a/src/kernel/activity/SynchroSleep.cpp +++ b/src/kernel/activity/SynchroSleep.cpp @@ -1,11 +1,9 @@ -/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include - -#include +#include "simgrid/s4u/Host.hpp" #include "src/kernel/context/Context.hpp" #include "src/kernel/activity/SynchroSleep.hpp" diff --git a/src/kernel/routing/NetPoint.cpp b/src/kernel/routing/NetPoint.cpp index d1f353c93a..616fdc5eac 100644 --- a/src/kernel/routing/NetPoint.cpp +++ b/src/kernel/routing/NetPoint.cpp @@ -1,13 +1,12 @@ -/* Copyright (c) 2009-2011, 2013-2016. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/routing/NetPoint.hpp" -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "surf/surf_routing.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf"); diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index efbfb1c79d..5a6483624c 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -1,11 +1,11 @@ -/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/routing/NetZoneImpl.hpp" -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" diff --git a/src/kernel/routing/VivaldiZone.cpp b/src/kernel/routing/VivaldiZone.cpp index 78e500c10a..79a5d19329 100644 --- a/src/kernel/routing/VivaldiZone.cpp +++ b/src/kernel/routing/VivaldiZone.cpp @@ -1,12 +1,12 @@ -/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/kernel/routing/VivaldiZone.hpp" diff --git a/src/mc/mc_smx.cpp b/src/mc/mc_smx.cpp index ff841f7d45..85b31ed962 100644 --- a/src/mc/mc_smx.cpp +++ b/src/mc/mc_smx.cpp @@ -3,22 +3,8 @@ /* 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 -#include -#include +#include "simgrid/s4u/Host.hpp" -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "src/simix/smx_private.h" #include "src/mc/mc_smx.h" #include "src/mc/ModelChecker.hpp" diff --git a/src/msg/instr_msg_process.cpp b/src/msg/instr_msg_process.cpp index 8bb5b20cce..d200f1e341 100644 --- a/src/msg/instr_msg_process.cpp +++ b/src/msg/instr_msg_process.cpp @@ -1,9 +1,9 @@ -/* Copyright (c) 2010, 2012-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010, 2012-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/instr/instr_private.h" #include "src/msg/msg_private.h" #include "src/simix/ActorImpl.hpp" diff --git a/src/msg/msg_environment.cpp b/src/msg/msg_environment.cpp index 3c3bdf8693..e50abe085f 100644 --- a/src/msg/msg_environment.cpp +++ b/src/msg/msg_environment.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/NetZone.hpp" -#include "simgrid/s4u/engine.hpp" #include "src/msg/msg_private.h" #if HAVE_LUA diff --git a/src/msg/msg_global.cpp b/src/msg/msg_global.cpp index bec6a7b90d..1eefcc5577 100644 --- a/src/msg/msg_global.cpp +++ b/src/msg/msg_global.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "instr/instr_interface.h" #include "mc/mc.h" diff --git a/src/msg/msg_host.cpp b/src/msg/msg_host.cpp index 7c86679d7a..43a6b24aac 100644 --- a/src/msg/msg_host.cpp +++ b/src/msg/msg_host.cpp @@ -1,11 +1,10 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/host.hpp" -#include "simgrid/s4u/storage.hpp" +#include "simgrid/s4u/Host.hpp" +#include "simgrid/s4u/Storage.hpp" #include "src/msg/msg_private.h" #include "src/simix/ActorImpl.hpp" #include "src/simix/smx_host_private.h" diff --git a/src/msg/msg_io.cpp b/src/msg/msg_io.cpp index cfd487c889..282f46ace7 100644 --- a/src/msg/msg_io.cpp +++ b/src/msg/msg_io.cpp @@ -1,9 +1,9 @@ -/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/msg/msg_private.h" #include "src/surf/storage_interface.hpp" #include diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index 2449389822..f000746bcd 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -4,7 +4,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "msg_private.h" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/simix/ActorImpl.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_process, msg, "Logging specific to MSG (process)"); diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index bbed1a8a8d..de5b546865 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2006-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,8 +6,8 @@ #include "xbt/log.h" #include "simgrid/s4u/Actor.hpp" -#include "simgrid/s4u/comm.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Comm.hpp" +#include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Mailbox.hpp" #include "src/kernel/context/Context.hpp" diff --git a/src/s4u/s4u_comm.cpp b/src/s4u/s4u_comm.cpp index eaa600916d..5fecc9563d 100644 --- a/src/s4u/s4u_comm.cpp +++ b/src/s4u/s4u_comm.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2006-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,9 +6,8 @@ #include "xbt/log.h" #include "src/msg/msg_private.h" -#include "simgrid/s4u/comm.hpp" -#include - +#include "simgrid/s4u/Comm.hpp" +#include "simgrid/s4u/Mailbox.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_comm,s4u_activity,"S4U asynchronous communications"); diff --git a/src/s4u/s4u_engine.cpp b/src/s4u/s4u_engine.cpp index 3d98c545a2..7c1d47df17 100644 --- a/src/s4u/s4u_engine.cpp +++ b/src/s4u/s4u_engine.cpp @@ -1,23 +1,23 @@ /* s4u::Engine Simulation Engine and global functions. */ -/* Copyright (c) 2006-2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "instr/instr_interface.h" #include "mc/mc.h" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Mailbox.hpp" #include "simgrid/s4u/NetZone.hpp" -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" -#include "simgrid/s4u/storage.hpp" +#include "simgrid/s4u/Storage.hpp" #include "simgrid/simix.h" #include "src/kernel/EngineImpl.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/kernel/routing/NetZoneImpl.hpp" #include "src/surf/network_interface.hpp" -#include "surf/surf.h" // routing_platf. FIXME:KILLME. SOON +#include "surf/surf.h" // routing_platf. FIXME:KILLME. SOON XBT_LOG_NEW_CATEGORY(s4u,"Log channels of the S4U (Simgrid for you) interface"); diff --git a/src/s4u/s4u_file.cpp b/src/s4u/s4u_file.cpp index bb87435f54..fafc21dd17 100644 --- a/src/s4u/s4u_file.cpp +++ b/src/s4u/s4u_file.cpp @@ -1,21 +1,20 @@ -/* Copyright (c) 2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "xbt/log.h" +#include "simgrid/simix.h" #include "src/msg/msg_private.h" +#include "xbt/log.h" #include "simgrid/s4u/Actor.hpp" -#include "simgrid/s4u/comm.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Comm.hpp" +#include "simgrid/s4u/File.hpp" +#include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/Mailbox.hpp" XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_file,"S4U files"); -#include "simgrid/s4u/file.hpp" -#include "simgrid/s4u/host.hpp" -#include "simgrid/simix.h" namespace simgrid { namespace s4u { diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 6c8a7ecd48..7846f76df3 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -9,9 +9,9 @@ #include -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" -#include "simgrid/s4u/storage.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" +#include "simgrid/s4u/Storage.hpp" #include "simgrid/simix.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/msg/msg_private.h" diff --git a/src/s4u/s4u_netzone.cpp b/src/s4u/s4u_netzone.cpp index 6aa572dc07..17035d2189 100644 --- a/src/s4u/s4u_netzone.cpp +++ b/src/s4u/s4u_netzone.cpp @@ -1,12 +1,12 @@ -/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "xbt/log.h" +#include "simgrid/s4u/Host.hpp" #include "simgrid/s4u/NetZone.hpp" -#include "simgrid/s4u/host.hpp" #include "simgrid/simix.hpp" #include "src/kernel/routing/NetPoint.hpp" #include "src/surf/network_interface.hpp" // Link FIXME: move to proper header diff --git a/src/s4u/s4u_storage.cpp b/src/s4u/s4u_storage.cpp index 53cfb30ce4..ba1820b07a 100644 --- a/src/s4u/s4u_storage.cpp +++ b/src/s4u/s4u_storage.cpp @@ -1,10 +1,9 @@ -/* Copyright (c) 2006-2015, 2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/storage.hpp" +#include "simgrid/s4u/Storage.hpp" #include "simgrid/simix.hpp" #include "src/surf/storage_interface.hpp" #include "xbt/lib.h" diff --git a/src/simdag/sd_global.cpp b/src/simdag/sd_global.cpp index a8e4ddd50a..0248689e97 100644 --- a/src/simdag/sd_global.cpp +++ b/src/simdag/sd_global.cpp @@ -1,12 +1,10 @@ -/* Copyright (c) 2006-2016. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simdag_private.hpp" -#include "simgrid/host.h" -#include "simgrid/s4u/engine.hpp" +#include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.h" #include "src/include/instr/instr_interface.h" #include "src/surf/surf_interface.hpp" diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 5bf67431eb..308a135c9b 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -1,15 +1,14 @@ -/* Copyright (c) 2013-2016. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include "xbt/dict.h" #include "simgrid/host.h" -#include -#include +#include "simgrid/s4u/Host.hpp" +#include "xbt/Extendable.hpp" +#include "xbt/dict.h" #include "src/kernel/routing/NetPoint.hpp" #include "src/simix/smx_host_private.h" diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 606bece0b0..b16b66de41 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2007-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -17,7 +16,7 @@ #include #include -#include +#include "simgrid/s4u/Host.hpp" #include diff --git a/src/simix/smx_deployment.cpp b/src/simix/smx_deployment.cpp index 492e147ac4..569d96bfbb 100644 --- a/src/simix/smx_deployment.cpp +++ b/src/simix/smx_deployment.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2007, 2009-2016. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,12 +6,9 @@ #include #include -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Host.hpp" #include "smx_private.h" #include "src/surf/xml/platf_private.hpp" // FIXME: KILLME. There must be a better way than mimicking XML here -#include "xbt/dict.h" -#include "xbt/log.h" -#include "xbt/sysdep.h" #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_deployment, simix, "Logging specific to SIMIX (deployment)"); diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index e34130da60..09313d8aab 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -12,14 +12,13 @@ #include -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/surf/surf_interface.hpp" #include "src/surf/storage_interface.hpp" #include "src/surf/xml/platf.hpp" #include "smx_private.h" -#include "xbt/str.h" #include "xbt/ex.h" /* ex_backtrace_display */ #include "mc/mc.h" #include "src/mc/mc_replay.h" diff --git a/src/simix/smx_io.cpp b/src/simix/smx_io.cpp index 73f4d1b121..88892bf402 100644 --- a/src/simix/smx_io.cpp +++ b/src/simix/smx_io.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -9,7 +8,7 @@ #include #include -#include +#include "simgrid/s4u/Host.hpp" #include diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index ac97e48ce9..852db10018 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -9,7 +9,7 @@ #include -#include +#include "simgrid/s4u/Host.hpp" #include "mc/mc.h" #include "simgrid/s4u/Mailbox.hpp" @@ -17,8 +17,6 @@ #include "src/simix/smx_private.h" #include "src/surf/cpu_interface.hpp" #include "src/surf/surf_interface.hpp" -#include "xbt/dict.h" -#include "xbt/log.h" #include "src/kernel/activity/SynchroComm.hpp" #include "src/surf/network_interface.hpp" diff --git a/src/smpi/SmpiHost.cpp b/src/smpi/SmpiHost.cpp index 79ea6b199d..9f0e626773 100644 --- a/src/smpi/SmpiHost.cpp +++ b/src/smpi/SmpiHost.cpp @@ -1,6 +1,12 @@ -#include "smpi/smpi_utils.hpp" +/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "src/smpi/SmpiHost.hpp" -#include +#include "simgrid/s4u/VirtualMachine.hpp" +#include "smpi/smpi_utils.hpp" + #include #include diff --git a/src/smpi/SmpiHost.hpp b/src/smpi/SmpiHost.hpp index d746dd305f..a3667fe8ea 100644 --- a/src/smpi/SmpiHost.hpp +++ b/src/smpi/SmpiHost.hpp @@ -1,15 +1,18 @@ +/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #ifndef SMPI_HOST_HPP_ #define SMPI_HOST_HPP_ #include "src/include/smpi/smpi_utils.hpp" -#include +#include "simgrid/s4u/Host.hpp" #include #include -#include #include - - +#include namespace simgrid { namespace smpi { diff --git a/src/smpi/smpi_comm.cpp b/src/smpi/smpi_comm.cpp index 9bb515e123..a3b9f5f0fe 100644 --- a/src/smpi/smpi_comm.cpp +++ b/src/smpi/smpi_comm.cpp @@ -1,17 +1,9 @@ -/* Copyright (c) 2010-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include -#include - -#include -#include -#include - -#include +#include "simgrid/s4u/Host.hpp" #include "private.h" #include "src/simix/smx_private.h" diff --git a/src/smpi/smpi_dvfs.cpp b/src/smpi/smpi_dvfs.cpp index c5910cb639..bc9d903607 100644 --- a/src/smpi/smpi_dvfs.cpp +++ b/src/smpi/smpi_dvfs.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,9 +6,9 @@ #include // FIXME: this plugin should be separated from the core +#include "simgrid/s4u/Host.hpp" #include #include -#include #include diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index 7a11da6fe8..91e1456a71 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -3,8 +3,8 @@ /* 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 -#include +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "private.h" diff --git a/src/smpi/smpi_request.cpp b/src/smpi/smpi_request.cpp index c7a048b630..4bc218b2fb 100644 --- a/src/smpi/smpi_request.cpp +++ b/src/smpi/smpi_request.cpp @@ -3,18 +3,14 @@ /* 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 -#include #include "private.h" #include "mc/mc.h" #include "src/mc/mc_replay.h" -#include "src/simix/smx_private.h" -#include "simgrid/sg_config.h" -#include "smpi/smpi_utils.hpp" #include "src/smpi/SmpiHost.hpp" -#include #include "src/kernel/activity/SynchroComm.hpp" +#include + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_request, smpi, "Logging specific to SMPI (reques)"); static simgrid::config::Flag smpi_iprobe_sleep( diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index ed0aa26a70..11c8ca027a 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,7 +6,7 @@ #ifndef SURF_CPU_INTERFACE_HPP_ #define SURF_CPU_INTERFACE_HPP_ -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/surf/maxmin_private.hpp" /*********** diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 8386f557fb..6c4a48483e 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -1,13 +1,12 @@ -/* Copyright (c) 2010, 2012-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/instr/instr_private.h" -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "src/kernel/routing/NetZoneImpl.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 2049393e2f..22f0325d9d 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -8,7 +7,7 @@ #include "maxmin_private.hpp" #include "network_cm02.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Host.hpp" #include "simgrid/sg_config.h" #include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index d9a1671a23..2e6d67b55b 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -200,8 +200,7 @@ public: * @param model The NetworkModel associated to this NetworkAction * @param cost The cost of this NetworkAction in [TODO] * @param failed [description] - * @param var The lmm variable associated to this Action if it is part of a - * LMM component + * @param var The lmm variable associated to this Action if it is part of a LMM component */ NetworkAction(simgrid::surf::Model* model, double cost, bool failed, lmm_variable_t var) : simgrid::surf::Action(model, cost, failed, var){}; diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index 17fd032048..608a3c3785 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -8,9 +8,10 @@ #include "src/plugins/vm/VirtualMachineImpl.hpp" #include "src/surf/cpu_interface.hpp" +#include "simgrid/s4u/Engine.hpp" + #include #include -#include #include #include #include diff --git a/src/surf/plugins/host_load.cpp b/src/surf/plugins/host_load.cpp index 623ae67b87..024b629a01 100644 --- a/src/surf/plugins/host_load.cpp +++ b/src/surf/plugins/host_load.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -8,9 +8,10 @@ #include "src/plugins/vm/VirtualMachineImpl.hpp" #include "src/surf/cpu_interface.hpp" +#include "simgrid/s4u/Engine.hpp" + #include #include -#include #include #include #include diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index bc3b670dda..283970c71d 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -3,7 +3,7 @@ /* 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/engine.hpp" +#include "simgrid/s4u/Engine.hpp" #include "src/kernel/EngineImpl.hpp" #include "src/simix/smx_private.h" diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index e54a651b42..275667e7ef 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -1,13 +1,11 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "storage_n11.hpp" -#include "simgrid/s4u/engine.hpp" +#include "simgrid/s4u/Engine.hpp" #include "src/kernel/routing/NetPoint.hpp" -#include "surf_private.h" #include /*ceil*/ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage); diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index 94e198025b..e57d90b6a8 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -1,10 +1,9 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/engine.hpp" +#include "simgrid/s4u/Engine.hpp" #include "src/instr/instr_private.h" #include "src/plugins/vm/VirtualMachineImpl.hpp" diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 6c00e7caca..2b1cfbbe5d 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -1,21 +1,16 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "surf_interface.hpp" -#include "cpu_interface.hpp" #include "mc/mc.h" -#include "network_interface.hpp" -#include "simgrid/s4u/engine.hpp" +#include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.h" #include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals -#include "src/internal_config.h" #include "src/kernel/routing/NetPoint.hpp" -#include "src/simix/smx_host_private.h" #include "src/surf/HostImpl.hpp" -#include "surf_private.h" + #include #include diff --git a/src/surf/xml/surfxml_sax_cb.cpp b/src/surf/xml/surfxml_sax_cb.cpp index 43f712cf97..f33d9108dd 100644 --- a/src/surf/xml/surfxml_sax_cb.cpp +++ b/src/surf/xml/surfxml_sax_cb.cpp @@ -3,21 +3,11 @@ /* 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 -#include -#include /* va_arg */ - -#include "simgrid/link.h" -#include "simgrid/s4u/engine.hpp" +#include "simgrid/s4u/Engine.hpp" #include "simgrid/sg_config.h" #include "src/kernel/routing/NetPoint.hpp" #include "src/surf/network_interface.hpp" -#include "src/surf/surf_private.h" -#include "xbt/dict.h" #include "xbt/file.h" -#include "xbt/log.h" -#include "xbt/misc.h" -#include "xbt/str.h" #include "src/surf/xml/platf_private.hpp" #include diff --git a/teshsuite/simdag/flatifier/flatifier.cpp b/teshsuite/simdag/flatifier/flatifier.cpp index 6675df2343..5baf8683a3 100644 --- a/teshsuite/simdag/flatifier/flatifier.cpp +++ b/teshsuite/simdag/flatifier/flatifier.cpp @@ -1,23 +1,14 @@ -/* Copyright (c) 2008-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include -#include -#include - -#include -#include -#include -#include #include -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" -#include +#include "simgrid/simdag.h" #include "src/kernel/routing/NetPoint.hpp" #include "src/surf/network_interface.hpp" diff --git a/teshsuite/simdag/is-router/is-router.cpp b/teshsuite/simdag/is-router/is-router.cpp index eaa9d45b3b..242d10bc89 100644 --- a/teshsuite/simdag/is-router/is-router.cpp +++ b/teshsuite/simdag/is-router/is-router.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2008-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/engine.hpp" -#include "simgrid/s4u/host.hpp" +#include "simgrid/s4u/Engine.hpp" +#include "simgrid/s4u/Host.hpp" #include "simgrid/simdag.h" #include "src/kernel/routing/NetPoint.hpp" #include "surf/surf_routing.h" diff --git a/teshsuite/surf/surf_usage/surf_usage.cpp b/teshsuite/surf/surf_usage/surf_usage.cpp index 6aec7c09e8..6d71570aaa 100644 --- a/teshsuite/surf/surf_usage/surf_usage.cpp +++ b/teshsuite/surf/surf_usage/surf_usage.cpp @@ -1,20 +1,14 @@ /* A few basic tests for the surf library */ -/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "surf/surf.h" #include "simgrid/host.h" -#include "simgrid/s4u/host.hpp" -#include "simgrid/sg_config.h" #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" -#include "src/surf/surf_interface.hpp" -#include -#include "xbt/log.h" XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); static const char *string_action(simgrid::surf::Action::State state) diff --git a/teshsuite/surf/surf_usage2/surf_usage2.cpp b/teshsuite/surf/surf_usage2/surf_usage2.cpp index 3825f361ea..1ce42766a2 100644 --- a/teshsuite/surf/surf_usage2/surf_usage2.cpp +++ b/teshsuite/surf/surf_usage2/surf_usage2.cpp @@ -1,19 +1,14 @@ /* A few basic tests for the surf library */ -/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "surf/surf.h" #include "simgrid/host.h" -#include "simgrid/s4u/host.hpp" -#include "simgrid/sg_config.h" #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" -#include "src/surf/surf_interface.hpp" -#include "xbt/log.h" XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example"); int main(int argc, char **argv) diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 91b4f308ac..3ee6a757ca 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -673,16 +673,16 @@ set(headers_to_install include/simgrid/s4u/forward.hpp include/simgrid/s4u/Activity.hpp include/simgrid/s4u/Actor.hpp - include/simgrid/s4u/comm.hpp + include/simgrid/s4u/Comm.hpp include/simgrid/s4u/ConditionVariable.hpp - include/simgrid/s4u/engine.hpp - include/simgrid/s4u/file.hpp - include/simgrid/s4u/host.hpp + include/simgrid/s4u/Engine.hpp + include/simgrid/s4u/File.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/Storage.hpp include/simgrid/s4u/VirtualMachine.hpp include/simgrid/s4u.hpp include/simgrid/plugins/energy.h