Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simix::Synchro: Factorize the refcounting for child classes
[simgrid.git] / src / simix / Synchro.h
index d119a8d..dc5a949 100644 (file)
@@ -25,6 +25,11 @@ namespace simix {
 
     virtual void suspend()=0;
     virtual void resume()=0;
+
+    void ref();
+    void unref();
+  private:
+    int refcount=1;
   };
 }} // namespace simgrid::simix
 #else /* not C++ */