-/* Copyright (c) 2013-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
const s4u::VirtualMachine* vm = dynamic_cast<s4u::VirtualMachine*>(task.get_host());
if (vm != nullptr) {
VirtualMachineImpl* vm_impl = vm->get_vm_impl();
- vm_impl->add_active_exec();
+ for (int i = 1; i <= task.get_thread_count(); i++)
+ vm_impl->add_active_exec();
vm_impl->update_action_weight();
}
}
const s4u::VirtualMachine* vm = dynamic_cast<s4u::VirtualMachine*>(exec->get_host());
if (vm != nullptr) {
VirtualMachineImpl* vm_impl = vm->get_vm_impl();
- vm_impl->remove_active_exec();
+ for (int i = 1; i <= exec->get_thread_count(); i++)
+ vm_impl->remove_active_exec();
vm_impl->update_action_weight();
}
}