Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use a simcall to retrieve mounted storages.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 3 Mar 2020 22:02:36 +0000 (23:02 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Mar 2020 12:40:37 +0000 (13:40 +0100)
For reproducibility concerns, make a simcall even when it's already cached.

src/s4u/s4u_Host.cpp

index f366323..b9b273c 100644 (file)
@@ -287,9 +287,10 @@ std::vector<const char*> Host::get_attached_storages() const
 
 std::unordered_map<std::string, Storage*> const& Host::get_mounted_storages()
 {
-  if (mounts_ == nullptr)
-    mounts_ = pimpl_->get_mounted_storages();
-
+  kernel::actor::simcall([this] {
+    if (mounts_ == nullptr)
+      mounts_ = pimpl_->get_mounted_storages();
+  });
   return *mounts_;
 }