Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Explicit instanciation of xbt::Extendable<> specializations.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 17 Sep 2019 08:23:17 +0000 (10:23 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 6 Jan 2020 21:09:44 +0000 (22:09 +0100)
Fixes Asan warnings about odr-violations (default with current gcc-10, or with
ASAN_OPTIONS='use_odr_indicator=true detect_odr_violation=2').

It may also complete commit f2e9bf81aebf9a0d39563c3f955fc24e9270d74f
"Explicit instanciation of Extendable<simgrid::s4u::Host>".

18 files changed:
include/simgrid/kernel/routing/NetPoint.hpp
include/simgrid/plugins/file_system.h
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Disk.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/Storage.hpp
src/kernel/routing/NetPoint.cpp
src/msg/msg_private.hpp
src/msg/msg_task.cpp
src/plugins/file_system/s4u_FileSystem.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/plugins/vm/VirtualMachineImpl.hpp
src/s4u/s4u_Actor.cpp
src/s4u/s4u_Disk.cpp
src/s4u/s4u_Host.cpp
src/s4u/s4u_Link.cpp
src/s4u/s4u_Storage.cpp

index 0ea15d1..bddc556 100644 (file)
@@ -13,6 +13,9 @@
 #include <simgrid/kernel/routing/NetZoneImpl.hpp>
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<kernel::routing::NetPoint>;
+
 namespace kernel {
 namespace routing {
 
index 6384260..d180a9a 100644 (file)
@@ -85,6 +85,9 @@ SG_END_DECL
 #ifdef __cplusplus
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::File>;
+
 namespace s4u {
 
 /** @brief A simulated file
index 84d61a9..4f27167 100644 (file)
@@ -19,6 +19,9 @@
 #include <unordered_map>
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Actor>;
+
 namespace s4u {
 
 /** An actor is an independent stream of execution in your distributed application.
index ed1db6a..11651d3 100644 (file)
@@ -17,6 +17,9 @@
 #include <unordered_map>
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Disk>;
+
 namespace s4u {
 
 /** Disk represent the disk resources associated to a host
index 5f29122..4870a86 100644 (file)
@@ -16,9 +16,7 @@
 
 namespace simgrid {
 
-namespace xbt {
-extern template class XBT_PUBLIC Extendable<s4u::Host>;
-} // namespace xbt
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Host>;
 
 namespace s4u {
 /** @ingroup s4u_api
index 7fc72cc..c2e6453 100644 (file)
@@ -20,6 +20,9 @@
  ***********/
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Link>;
+
 namespace s4u {
 /** @brief A Link represents the network facilities between [hosts](@ref simgrid::s4u::Host) */
 class XBT_PUBLIC Link : public xbt::Extendable<Link> {
index ddf443b..3247dff 100644 (file)
@@ -17,6 +17,9 @@
 #include <unordered_map>
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Storage>;
+
 namespace s4u {
 
 /** Storage represent the disk resources, usually associated to a given host
index 3dea849..6ff888d 100644 (file)
@@ -10,6 +10,9 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
 
 namespace simgrid {
+
+template class xbt::Extendable<kernel::routing::NetPoint>;
+
 namespace kernel {
 namespace routing {
 
index dcce872..b6ad111 100644 (file)
@@ -16,6 +16,9 @@
 
 /**************** datatypes **********************************/
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<msg::Task>;
+
 namespace msg {
 class Task : public xbt::Extendable<Task> {
   std::string name_             = "";
index 4757400..8c75966 100644 (file)
@@ -16,6 +16,9 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_task, msg, "Logging specific to MSG (task)");
 
 namespace simgrid {
+
+template class xbt::Extendable<msg::Task>;
+
 namespace msg {
 
 Task::Task(const std::string& name, double flops_amount, double bytes_amount, void* data)
index bce513b..350382a 100644 (file)
@@ -27,6 +27,9 @@ int sg_storage_max_file_descriptors = 1024;
  */
 
 namespace simgrid {
+
+template class xbt::Extendable<s4u::File>;
+
 namespace s4u {
 simgrid::xbt::Extension<Disk, FileSystemDiskExt> FileSystemDiskExt::EXTENSION_ID;
 simgrid::xbt::Extension<Storage, FileSystemStorageExt> FileSystemStorageExt::EXTENSION_ID;
index 581d3f9..03e4203 100644 (file)
@@ -20,6 +20,9 @@ void surf_vm_model_init_HL13()
 }
 
 namespace simgrid {
+
+template class xbt::Extendable<vm::VirtualMachineImpl>;
+
 namespace vm {
 /*************
  * Callbacks *
index d263834..bb1807e 100644 (file)
@@ -14,6 +14,9 @@
 #define VM_INTERFACE_HPP_
 
 namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<vm::VirtualMachineImpl>;
+
 namespace vm {
 
 /************
index a23ed08..5b711b5 100644 (file)
@@ -21,6 +21,9 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_actor, s4u, "S4U actors");
 
 namespace simgrid {
+
+template class xbt::Extendable<s4u::Actor>;
+
 namespace s4u {
 
 xbt::signal<void(Actor&)> s4u::Actor::on_creation;
index d8ad904..684cbab 100644 (file)
@@ -10,9 +10,8 @@
 #include "src/kernel/resource/DiskImpl.hpp"
 
 namespace simgrid {
-namespace xbt {
-template class Extendable<s4u::Disk>;
-} // namespace xbt
+
+template class xbt::Extendable<s4u::Disk>;
 
 namespace s4u {
 
index a88ada1..858750b 100644 (file)
@@ -18,9 +18,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_host, s4u, "Logging specific to the S4U host
 XBT_LOG_EXTERNAL_CATEGORY(surf_route);
 
 namespace simgrid {
-namespace xbt {
-template class Extendable<s4u::Host>;
-} // namespace xbt
+
+template class xbt::Extendable<s4u::Host>;
 
 namespace s4u {
 
index 9ead7c2..4942e65 100644 (file)
@@ -14,6 +14,9 @@
 #include "xbt/log.h"
 
 namespace simgrid {
+
+template class xbt::Extendable<s4u::Link>;
+
 namespace s4u {
 
 xbt::signal<void(Link&)> Link::on_creation;
index 6ecf463..b051b69 100644 (file)
@@ -11,9 +11,8 @@
 #include "src/surf/StorageImpl.hpp"
 
 namespace simgrid {
-namespace xbt {
-template class Extendable<s4u::Storage>;
-} // namespace xbt
+
+template class xbt::Extendable<s4u::Storage>;
 
 namespace s4u {