A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add WIFI decay model along with tesh tests.
[simgrid.git]
/
src
/
s4u
/
s4u_Host.cpp
diff --git
a/src/s4u/s4u_Host.cpp
b/src/s4u/s4u_Host.cpp
index
a4aad5c
..
e5edd61
100644
(file)
--- a/
src/s4u/s4u_Host.cpp
+++ b/
src/s4u/s4u_Host.cpp
@@
-287,9
+287,10
@@
std::vector<const char*> Host::get_attached_storages() const
std::unordered_map<std::string, Storage*> const& Host::get_mounted_storages()
{
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_;
}
return *mounts_;
}
@@
-349,7
+350,7
@@
sg_host_t sg_host_by_name(const char* name)
return simgrid::s4u::Host::by_name_or_null(name);
}
return simgrid::s4u::Host::by_name_or_null(name);
}
-xbt_dynar_t sg_hosts_as_dynar()
+xbt_dynar_t sg_hosts_as_dynar()
// XBT_ATTRIB_DEPRECATED_v330
{
std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
{
std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
@@
-389,7
+390,7
@@
void sg_host_user_destroy(sg_host_t host) // deprecated
}
// ========= storage related functions ============
}
// ========= storage related functions ============
-void sg_host_disks(sg_host_t host, unsigned int* disk_count, sg_disk_t** disks)
+void sg_host_disks(
const_
sg_host_t host, unsigned int* disk_count, sg_disk_t** disks)
{
std::vector<sg_disk_t> list = host->get_disks();
*disk_count = list.size();
{
std::vector<sg_disk_t> list = host->get_disks();
*disk_count = list.size();