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
[mc] Remote xbt_dynar_foreach() in MC_request_testany_fail()
[simgrid.git]
/
src
/
surf
/
vm_workstation_interface.cpp
diff --git
a/src/surf/vm_workstation_interface.cpp
b/src/surf/vm_workstation_interface.cpp
index
f331ea2
..
688ad12
100644
(file)
--- a/
src/surf/vm_workstation_interface.cpp
+++ b/
src/surf/vm_workstation_interface.cpp
@@
-1,9
+1,9
@@
-/*
- *
vm_workstation.cpp
- *
- * Created on: Nov 12, 2013
- *
Author: bedaride
- */
+/*
Copyright (c) 2013-2014. 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. */
+
#include "vm_workstation_interface.hpp"
#include "cpu_cas01.hpp"
#include "vm_workstation_interface.hpp"
#include "cpu_cas01.hpp"
@@
-28,6
+28,8
@@
WorkstationVMModel::WorkstationVMModel() : WorkstationModel("Virtual Workstation
p_cpuModel = surf_cpu_model_vm;
}
p_cpuModel = surf_cpu_model_vm;
}
+WorkstationVMModel::vm_list_t WorkstationVMModel::ws_vms;
+
/************
* Resource *
************/
/************
* Resource *
************/
@@
-36,6
+38,7
@@
WorkstationVM::WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
RoutingEdgePtr netElm, CpuPtr cpu)
: Workstation(model, name, props, NULL, netElm, cpu)
{
RoutingEdgePtr netElm, CpuPtr cpu)
: Workstation(model, name, props, NULL, netElm, cpu)
{
+ WorkstationVMModel::ws_vms.push_back(*this);
surf_callback_emit(workstationVMCreatedCallbacks, this);
}
surf_callback_emit(workstationVMCreatedCallbacks, this);
}
@@
-46,6
+49,8
@@
WorkstationVM::WorkstationVM(ModelPtr model, const char *name, xbt_dict_t props,
WorkstationVM::~WorkstationVM()
{
surf_callback_emit(workstationVMDestructedCallbacks, this);
WorkstationVM::~WorkstationVM()
{
surf_callback_emit(workstationVMDestructedCallbacks, this);
+ WorkstationVMModel::ws_vms.erase(WorkstationVMModel::
+ vm_list_t::s_iterator_to(*this));
}
void WorkstationVM::setState(e_surf_resource_state_t state){
}
void WorkstationVM::setState(e_surf_resource_state_t state){