X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/09a0b55d933dfe1b6c5e77c6e6b55be1b4e6da66..6a66ef7c8b80c9f76525b67c64d847e3803ee517:/src/simix/Synchro.h diff --git a/src/simix/Synchro.h b/src/simix/Synchro.h index 05b28a1009..da0e8e0837 100644 --- a/src/simix/Synchro.h +++ b/src/simix/Synchro.h @@ -5,6 +5,10 @@ #ifndef _SIMIX_SYNCHRO_HPP #define _SIMIX_SYNCHRO_HPP + +#include + +#include #include "simgrid/forward.h" #ifdef __cplusplus @@ -14,13 +18,13 @@ namespace simgrid { namespace simix { - class Synchro { + XBT_PUBLIC_CLASS Synchro { public: Synchro(); virtual ~Synchro(); - e_smx_state_t state; /* State of the synchro */ - char *name = nullptr; /* synchro name if any */ - xbt_fifo_t simcalls; /* List of simcalls waiting for this synchro */ + e_smx_state_t state = SIMIX_WAITING; /* State of the synchro */ + std::string name; /* synchro name if any */ + xbt_fifo_t simcalls = nullptr; /* List of simcalls waiting for this synchro */ char *category = nullptr; /* For instrumentation */ virtual void suspend()=0; @@ -30,7 +34,7 @@ namespace simix { void ref(); void unref(); private: - int refcount=1; + int refcount = 1; }; }} // namespace simgrid::simix #else /* not C++ */