void ref();
/** @brief Unref that action (and destroy it if refcount reaches 0)
* @return true if the action was destroyed and false if someone still has references on it */
- int unref();
+ bool unref();
/** @brief Cancel the current Action if running */
virtual void cancel();
allVms_.erase(iter);
/* Free the cpu_action of the VM. */
- XBT_ATTRIB_UNUSED int ret = action_->unref();
- xbt_assert(ret == 1, "Bug: some resource still remains");
+ XBT_ATTRIB_UNUSED bool ret = action_->unref();
+ xbt_assert(ret, "Bug: some resource still remains");
}
void VirtualMachineImpl::suspend(smx_actor_t issuer)
new_cpu_action->set_bound(old_bound);
}
- xbt_assert(action_->unref() == 1, "Bug: some resource still remains");
+ XBT_ATTRIB_UNUSED bool ret = action_->unref();
+ xbt_assert(ret, "Bug: some resource still remains");
action_ = new_cpu_action;