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
Remove features marked with XBT_ATTRIB_DEPRECATED_v325.
[simgrid.git]
/
src
/
s4u
/
s4u_Host.cpp
diff --git
a/src/s4u/s4u_Host.cpp
b/src/s4u/s4u_Host.cpp
index
0bb59b5
..
1d89a9e
100644
(file)
--- a/
src/s4u/s4u_Host.cpp
+++ b/
src/s4u/s4u_Host.cpp
@@
-18,8
+18,6
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_host, s4u, "Logging specific to the S4U hosts");
XBT_LOG_EXTERNAL_CATEGORY(surf_route);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_host, s4u, "Logging specific to the S4U hosts");
XBT_LOG_EXTERNAL_CATEGORY(surf_route);
-int USER_HOST_LEVEL = -1;
-
namespace simgrid {
namespace xbt {
template class Extendable<s4u::Host>;
namespace simgrid {
namespace xbt {
template class Extendable<s4u::Host>;
@@
-289,6
+287,15
@@
std::vector<Disk*> Host::get_disks() const
return kernel::actor::simcall([this] { return this->pimpl_->get_disks(); });
}
return kernel::actor::simcall([this] { return this->pimpl_->get_disks(); });
}
+void Host::add_disk(Disk* disk)
+{
+ kernel::actor::simcall([this, disk] { this->pimpl_->add_disk(disk); });
+}
+
+void Host::remove_disk(const std::string& disk_name)
+{
+ kernel::actor::simcall([this, disk_name] { this->pimpl_->remove_disk(disk_name); });
+}
/**
* @ingroup simix_storage_management
* @brief Returns the list of storages attached to a host.
/**
* @ingroup simix_storage_management
* @brief Returns the list of storages attached to a host.
@@
-392,17
+399,25
@@
xbt_dynar_t sg_hosts_as_dynar()
// ========= Layering madness ==============*
// ========== User data Layer ==========
// ========= Layering madness ==============*
// ========== User data Layer ==========
-void* sg_host_
user
(sg_host_t host)
+void* sg_host_
data
(sg_host_t host)
{
{
- return host->
extension(USER_HOST_LEVEL
);
+ return host->
get_data(
);
}
}
-void sg_host_
user
_set(sg_host_t host, void* userdata)
+void sg_host_
data
_set(sg_host_t host, void* userdata)
{
{
- host->
extension_set(USER_HOST_LEVEL,
userdata);
+ host->
set_data(
userdata);
}
}
-void
sg_host_user_destroy(sg_host_t host)
+void
* sg_host_user(sg_host_t host) // deprecated
{
{
- host->extension_set(USER_HOST_LEVEL, nullptr);
+ return host->get_data();
+}
+void sg_host_user_set(sg_host_t host, void* userdata) // deprecated
+{
+ host->set_data(userdata);
+}
+void sg_host_user_destroy(sg_host_t host) // deprecated
+{
+ host->set_data(nullptr);
}
// ========= storage related functions ============
}
// ========= storage related functions ============
@@
-527,12
+542,6
@@
int sg_host_is_on(sg_host_t host)
return host->is_on();
}
return host->is_on();
}
-/** @deprecated */
-int sg_host_is_off(sg_host_t host)
-{
- return not host->is_on();
-}
-
/** @brief Get the properties of a host */
xbt_dict_t sg_host_get_properties(sg_host_t host)
{
/** @brief Get the properties of a host */
xbt_dict_t sg_host_get_properties(sg_host_t host)
{