/* 0. Make sure that we already calculated the resource share at the physical
* machine layer. */
{
- ModelPtr ws_model = surf_workstation_model;
- ModelPtr vm_ws_model = surf_vm_workstation_model;
- unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model);
- unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model);
- xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_workstation_model comes before");
+ xbt_assert((xbt_dynar_search(model_list_invoke, &surf_workstation_model)<
+ xbt_dynar_search(model_list_invoke, &surf_vm_workstation_model)),
+ "Cannot assume surf_workstation_model comes before");
/* Another option is that we call sub_ws->share_resource() here. The
* share_resource() function has no side-effect. We can call it here to
WorkstationVMHL13::~WorkstationVMHL13()
{
/* Free the cpu_action of the VM. */
- int ret = p_action->unref();
- xbt_assert(ret == 1, "Bug: some resource still remains");
+ xbt_assert(p_action->unref() == 1, "Bug: some resource still remains");
}
void WorkstationVMHL13::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) {
new_cpu_action->setBound(old_bound);
}
- int ret = p_action->unref();
- xbt_assert(ret == 1, "Bug: some resource still remains");
+ xbt_assert( p_action->unref() == 1, "Bug: some resource still remains");
p_action = new_cpu_action;
}