X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/638b21d2071c77f39da2f322156f05f75bf91517..5410c0dedd6e07e55c0a74a0664d1f8a73d69c1e:/src/surf/cpu_interface.hpp diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 590b798519..e28d4d3913 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -100,6 +100,8 @@ public: */ XBT_PUBLIC_CLASS Cpu : public simgrid::surf::Resource { public: + static simgrid::xbt::FacetLevel LEVEL; + static void init(); Cpu(); /** @@ -175,15 +177,20 @@ public: virtual int getPstate()=0; void setState(e_surf_resource_state_t state); + void plug(simgrid::Host* host); void addTraces(void); int m_core = 1; /* Amount of cores */ double m_speedPeak; /*< CPU speed peak, ie max value */ double m_speedScale; /*< Percentage of CPU available according to the trace, in [O,1] */ + simgrid::Host* m_host = nullptr; + + simgrid::Host* getHost() { return m_host; } /* Note (hypervisor): */ - lmm_constraint_t *p_constraintCore; - void **p_constraintCoreId; + lmm_constraint_t *p_constraintCore=NULL; + void **p_constraintCoreId=NULL; + }; /**********