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
Update copyright notices
[simgrid.git]
/
src
/
surf
/
vm_interface.hpp
diff --git
a/src/surf/vm_interface.hpp
b/src/surf/vm_interface.hpp
index
a8ddce8
..
64a4cef
100644
(file)
--- a/
src/surf/vm_interface.hpp
+++ b/
src/surf/vm_interface.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2004-201
4
. The SimGrid Team.
+/* Copyright (c) 2004-201
5
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-17,35
+17,26
@@
***********/
class VMModel;
***********/
class VMModel;
-typedef VMModel *VMModelPtr;
-
class VM;
class VM;
-typedef VM *VMPtr;
-
-class VMLmm;
-typedef VMLmm *VMLmmPtr;
/*************
* Callbacks *
*************/
/** @ingroup SURF_callbacks
/*************
* Callbacks *
*************/
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM creation *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM creation. Signature: `void(VM*)`
*/
*/
-extern surf_callback(void, VM
Ptr
) VMCreatedCallbacks;
+extern surf_callback(void, VM
*
) VMCreatedCallbacks;
/** @ingroup SURF_callbacks
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM destruction *
- * @details Callback functions have the following signature: `void(VMPtr)`
+ * @brief Callbacks fired after VM destruction. Signature: `void(VM*)`
*/
*/
-extern surf_callback(void, VM
Ptr
) VMDestructedCallbacks;
+extern surf_callback(void, VM
*
) VMDestructedCallbacks;
/** @ingroup SURF_callbacks
/** @ingroup SURF_callbacks
- * @brief Callbacks handler which emit the callbacks after VM State changed *
- * @details Callback functions have the following signature: `void(VMActionPtr)`
+ * @brief Callbacks after VM State changes. Signature: `void(VMAction*)`
*/
*/
-extern surf_callback(void, VM
Ptr
) VMStateChangedCallbacks;
+extern surf_callback(void, VM
*
) VMStateChangedCallbacks;
/*********
* Model *
/*********
* Model *
@@
-56,10
+47,10
@@
extern surf_callback(void, VMPtr) VMStateChangedCallbacks;
*/
class VMModel : public HostModel {
public:
*/
class VMModel : public HostModel {
public:
- VMModel()
;
+ VMModel()
:HostModel(){}
~VMModel(){};
~VMModel(){};
- Host
Ptr
createHost(const char *name){DIE_IMPOSSIBLE;}
+ Host
*
createHost(const char *name){DIE_IMPOSSIBLE;}
/**
* @brief Create a new VM
/**
* @brief Create a new VM
@@
-68,12
+59,10
@@
public:
* @param host_PM The real machine hosting the VM
*
*/
* @param host_PM The real machine hosting the VM
*
*/
- virtual VM
Ptr
createVM(const char *name, surf_resource_t host_PM)=0;
+ virtual VM
*
createVM(const char *name, surf_resource_t host_PM)=0;
void adjustWeightOfDummyCpuActions() {};
void adjustWeightOfDummyCpuActions() {};
- typedef boost::intrusive::list<VM,
- boost::intrusive::constant_time_size<false> >
- vm_list_t;
+ typedef boost::intrusive::list<VM, boost::intrusive::constant_time_size<false> > vm_list_t;
static vm_list_t ws_vms;
};
static vm_list_t ws_vms;
};
@@
-89,7
+78,7
@@
class VM : public Host,
public boost::intrusive::list_base_hook<> {
public:
/**
public boost::intrusive::list_base_hook<> {
public:
/**
- * @brief
VM c
onstructor
+ * @brief
C
onstructor
*
* @param model VMModel associated to this VM
* @param name The name of the VM
*
* @param model VMModel associated to this VM
* @param name The name of the VM
@@
-97,55
+86,38
@@
public:
* @param netElm The RoutingEdge associated to this VM
* @param cpu The Cpu associated to this VM
*/
* @param netElm The RoutingEdge associated to this VM
* @param cpu The Cpu associated to this VM
*/
- VM(Model
Ptr
model, const char *name, xbt_dict_t props,
- RoutingEdge
Ptr netElm, CpuPtr
cpu);
+ VM(Model
*
model, const char *name, xbt_dict_t props,
+ RoutingEdge
*netElm, Cpu *
cpu);
- /**
- * @brief WdorkstationVM destructor
- */
+ /** @brief Destructor */
~VM();
void setState(e_surf_resource_state_t state);
~VM();
void setState(e_surf_resource_state_t state);
- /**
- * @brief Suspend the VM
- */
+ /** @brief Suspend the VM */
virtual void suspend()=0;
virtual void suspend()=0;
- /**
- * @brief Resume the VM
- */
+ /** @brief Resume the VM */
virtual void resume()=0;
virtual void resume()=0;
- /**
- * @brief Save the VM (Not yet implemented)
- */
+ /** @brief Save the VM (Not yet implemented) */
virtual void save()=0;
virtual void save()=0;
- /**
- * @brief Restore the VM (Not yet implemented)
- */
+ /** @brief Restore the VM (Not yet implemented) */
virtual void restore()=0;
virtual void restore()=0;
- /**
- * @brief Migrate the VM to the destination host
- *
- * @param ind_vm_ws_dest The destination host
- */
- virtual void migrate(surf_resource_t ind_vm_ws_dest)=0;
+ /** @brief Migrate the VM to the destination host */
+ virtual void migrate(surf_resource_t dest_PM)=0;
- /**
- * @brief Get the physical machine hosting the VM
- * @return The physical machine hosting the VM
- */
+ /** @brief Get the physical machine hosting the VM */
virtual surf_resource_t getPm()=0;
virtual void setBound(double bound)=0;
virtual surf_resource_t getPm()=0;
virtual void setBound(double bound)=0;
- virtual void setAffinity(Cpu
Ptr
cpu, unsigned long mask)=0;
+ virtual void setAffinity(Cpu
*
cpu, unsigned long mask)=0;
/* The vm object of the lower layer */
/* The vm object of the lower layer */
- CpuAction
Ptr
p_action;
- Host
Ptr
p_subWs; // Pointer to the ''host'' OS
+ CpuAction
*
p_action;
+ Host
*
p_subWs; // Pointer to the ''host'' OS
e_surf_vm_state_t p_currentState;
};
e_surf_vm_state_t p_currentState;
};