XBT_PUBLIC(void) SIMIX_host_off(sg_host_t host, smx_process_t issuer);
XBT_PUBLIC(void) SIMIX_host_self_set_data(void *data);
XBT_PUBLIC(void*) SIMIX_host_self_get_data(void);
-XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_mounted_storage_list(sg_host_t host);
+
/********************************* Process ************************************/
XBT_PUBLIC(int) SIMIX_process_count(void);
XBT_PUBLIC(smx_process_t) SIMIX_process_self(void);
#include "surf/surf.h" // routing_get_network_element_type FIXME:killme
#include "src/simix/smx_private.hpp"
+#include "src/surf/host_interface.hpp"
size_t sg_host_count()
{
void Host::getParams(vm_params_t params)
{
- simgrid::simix::kernel(std::bind(SIMIX_host_get_params, this, params));
+ simgrid::simix::kernel([&]() {
+ this->extension<simgrid::surf::Host>()->getParams(params);
+ });
}
void Host::setParams(vm_params_t params)
{
- simgrid::simix::kernel(std::bind(SIMIX_host_set_params, this, params));
+ simgrid::simix::kernel([&]() {
+ this->extension<simgrid::surf::Host>()->setParams(params);
+ });
}
/**
*/
xbt_dict_t Host::getMountedStorageList()
{
- return simgrid::simix::kernel(std::bind(
- SIMIX_host_get_mounted_storage_list, this
- ));
+ return simgrid::simix::kernel([&] {
+ return this->extension<simgrid::surf::Host>()->getMountedStorageList();
+ });
}
/**
*/
xbt_dynar_t Host::getAttachedStorageList()
{
- return simgrid::simix::kernel(std::bind(
- SIMIX_host_get_attached_storage_list, this
- ));
+ return simgrid::simix::kernel([&] {
+ return this->extension<simgrid::surf::Host>()->getAttachedStorageList();
+ });
}
}
synchro->comm.surf_comm->setCategory(category);
}
}
-
-/**
- * \brief Function to get the parameters of the given the SIMIX host.
- *
- * \param host the host to get_phys_host (a sg_host_t)
- * \param param the parameter object space to be overwritten (a ws_params_t)
- */
-void SIMIX_host_get_params(sg_host_t ind_vm, vm_params_t params)
-{
- ind_vm->extension<simgrid::surf::Host>()->getParams(params);
-}
-
-void SIMIX_host_set_params(sg_host_t ind_vm, vm_params_t params)
-{
- ind_vm->extension<simgrid::surf::Host>()->setParams(params);
-}
-
-xbt_dict_t SIMIX_host_get_mounted_storage_list(sg_host_t host)
-{
- xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
- return host->extension<simgrid::surf::Host>()->getMountedStorageList();
-}
-
-xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host)
-{
- xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
- return host->extension<simgrid::surf::Host>()->getAttachedStorageList();
-}
XBT_PRIVATE void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority);
XBT_PRIVATE void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound);
XBT_PRIVATE void SIMIX_process_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask);
-XBT_PRIVATE xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host);
XBT_PRIVATE void SIMIX_host_execution_suspend(smx_synchro_t synchro);
XBT_PRIVATE void SIMIX_host_execution_resume(smx_synchro_t synchro);
XBT_PRIVATE void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm);
-XBT_PRIVATE void SIMIX_host_get_params(sg_host_t ind_vm, vm_params_t params);
-
-XBT_PRIVATE void SIMIX_host_set_params(sg_host_t ind_vm, vm_params_t params);
-
SG_END_DECL()
#endif