// ========== Simix layer =============
XBT_PUBLIC(smx_host_priv_t) sg_host_simix(sg_host_t host);
-XBT_PUBLIC(void) sg_host_simix_set(sg_host_t host, smx_host_priv_t priv);
// ========= storage related functions ============
XBT_PUBLIC(xbt_dict_t) sg_host_get_mounted_storage_list(sg_host_t host);
smx_host_priv_t sg_host_simix(sg_host_t host){
return host->extension<simgrid::simix::Host>();
}
-void sg_host_simix_set(sg_host_t host, smx_host_priv_t smx_host) {
- host->extension_set<simgrid::simix::Host>(smx_host);
-}
// ========= storage related functions ============
xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){
{
return simgrid::simix::kernelImmediate([&name, &phys_host] {
sg_host_t host = surf_vm_model->createVM(name, phys_host);
- SIMIX_host_create(host);
+ host->extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
return host;
});
sg_platf_init();
simgrid::surf::on_postparse.connect(SIMIX_post_create_environment);
simgrid::s4u::Host::onCreation.connect([](simgrid::s4u::Host& host) {
- SIMIX_host_create(&host);
+ host.extension_set<simgrid::simix::Host>(new simgrid::simix::Host());
});
simgrid::surf::storageCreatedCallbacks.connect([](simgrid::surf::Storage* storage) {
}
}
-/** @brief Internal function to create a SIMIX host. */
-void SIMIX_host_create(sg_host_t host)
-{
- sg_host_simix_set(host, new simgrid::simix::Host());
-}
-
/** @brief Start the host if it is off */
void SIMIX_host_on(sg_host_t h)
{
typedef simgrid::simix::Host s_smx_host_priv_t;
XBT_PRIVATE void _SIMIX_host_free_process_arg(void *);
-XBT_PRIVATE void SIMIX_host_create(sg_host_t host);
XBT_PRIVATE void SIMIX_host_add_auto_restart_process(sg_host_t host,
const char *name,