X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e4c3e60acadc7b5ca6238866641567bae9539067..b723df623c506205c9a65b32fc0c0177e494116f:/src/simix/Synchro.h diff --git a/src/simix/Synchro.h b/src/simix/Synchro.h index dc5a9496e9..6421d5c28c 100644 --- a/src/simix/Synchro.h +++ b/src/simix/Synchro.h @@ -5,6 +5,11 @@ #ifndef _SIMIX_SYNCHRO_HPP #define _SIMIX_SYNCHRO_HPP + +#include +#include + +#include #include "simgrid/forward.h" #ifdef __cplusplus @@ -14,22 +19,22 @@ 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 */ - char *category = nullptr; /* For instrumentation */ + e_smx_state_t state = SIMIX_WAITING; /* State of the synchro */ + std::string name; /* synchro name if any */ + std::list simcalls; /* List of simcalls waiting for this synchro */ virtual void suspend()=0; virtual void resume()=0; + virtual void post() =0; // What to do when a simcall terminates void ref(); void unref(); private: - int refcount=1; + int refcount = 1; }; }} // namespace simgrid::simix #else /* not C++ */