summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
efacb37)
- that field points to the s4u vision of myself.
- Fix the prototype of surf::VMModel::createVM() to ease the life
of its unique user
sg_host_t simcall_vm_create(const char *name, sg_host_t phys_host)
{
return simgrid::simix::kernelImmediate([&] {
sg_host_t simcall_vm_create(const char *name, sg_host_t phys_host)
{
return simgrid::simix::kernelImmediate([&] {
- surf_vm_model->createVM(name, phys_host);
- sg_host_t host = sg_host_by_name(name);
+ sg_host_t host = surf_vm_model->createVM(name, phys_host);
SIMIX_host_create(host);
return host;
SIMIX_host_create(host);
return host;
, hostPM_(hostPM)
{
VMModel::ws_vms.push_back(*this);
, hostPM_(hostPM)
{
VMModel::ws_vms.push_back(*this);
- simgrid::s4u::Host::by_name_or_create(name)->extension_set<simgrid::surf::HostImpl>(this);
+ piface = simgrid::s4u::Host::by_name_or_create(name);
+ piface->extension_set<simgrid::surf::HostImpl>(this);
* @param name The name of the new VM
* @param host_PM The real machine hosting the VM
*/
* @param name The name of the new VM
* @param host_PM The real machine hosting the VM
*/
- virtual VirtualMachine *createVM(const char *name, sg_host_t host_PM)=0;
+ virtual s4u::Host *createVM(const char *name, sg_host_t host_PM)=0;
void adjustWeightOfDummyCpuActions() {};
typedef boost::intrusive::member_hook<
void adjustWeightOfDummyCpuActions() {};
typedef boost::intrusive::member_hook<
void VMHL13Model::updateActionsState(double /*now*/, double /*delta*/) {}
void VMHL13Model::updateActionsState(double /*now*/, double /*delta*/) {}
-VirtualMachine *VMHL13Model::createVM(const char *name, sg_host_t host_PM)
+s4u::Host *VMHL13Model::createVM(const char *name, sg_host_t host_PM)
{
VirtualMachine* vm = new VMHL13(this, name, host_PM);
VMCreatedCallbacks(vm);
{
VirtualMachine* vm = new VMHL13(this, name, host_PM);
VMCreatedCallbacks(vm);
}
/* In the real world, processes on the guest operating system will be somewhat degraded due to virtualization overhead.
}
/* In the real world, processes on the guest operating system will be somewhat degraded due to virtualization overhead.
VMHL13Model();
~VMHL13Model(){};
VMHL13Model();
~VMHL13Model(){};
- VirtualMachine *createVM(const char *name, sg_host_t host_PM) override;
+ s4u::Host *createVM(const char *name, sg_host_t host_PM) override;
double next_occuring_event(double now) override;
void adjustWeightOfDummyCpuActions() override {};
void updateActionsState(double /*now*/, double /*delta*/) override;
double next_occuring_event(double now) override;
void adjustWeightOfDummyCpuActions() override {};
void updateActionsState(double /*now*/, double /*delta*/) override;