A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s4u::VM: make getState() public, and add a state for destroyed VMs
[simgrid.git]
/
src
/
msg
/
msg_vm.cpp
diff --git
a/src/msg/msg_vm.cpp
b/src/msg/msg_vm.cpp
index
c08b2c7
..
837268e
100644
(file)
--- a/
src/msg/msg_vm.cpp
+++ b/
src/msg/msg_vm.cpp
@@
-153,7
+153,8
@@
void MSG_vm_destroy(msg_vm_t vm)
if (MSG_vm_is_running(vm))
MSG_vm_shutdown(vm);
if (MSG_vm_is_running(vm))
MSG_vm_shutdown(vm);
- xbt_assert(MSG_vm_is_created(vm), "shutdown the given VM before destroying it");
+ xbt_assert(MSG_vm_is_created(vm) || __MSG_vm_is_state(vm, SURF_VM_STATE_DESTROYED),
+ "shutdown the given VM before destroying it");
/* Then, destroy the VM object */
simgrid::simix::kernelImmediate([vm]() {
/* Then, destroy the VM object */
simgrid::simix::kernelImmediate([vm]() {