summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5f8bb1a)
#include <cassert>
#ifdef ETL_LOCK_REFCOUNTS
#include <cassert>
#ifdef ETL_LOCK_REFCOUNTS
-#include <glibmm/thread.h>
+#include <synfig/mutex.h>
#endif
/* === M A C R O S ========================================================= */
#endif
/* === M A C R O S ========================================================= */
private:
mutable int refcount;
#ifdef ETL_LOCK_REFCOUNTS
private:
mutable int refcount;
#ifdef ETL_LOCK_REFCOUNTS
- mutable Glib::Mutex mutex;
+ mutable synfig::Mutex mutex;
void ref()const
{
#ifdef ETL_LOCK_REFCOUNTS
void ref()const
{
#ifdef ETL_LOCK_REFCOUNTS
- Glib::Mutex::Lock lock(mutex);
+ synfig::Mutex::Lock lock(mutex);
#endif
assert(refcount>=0); refcount++;
}
#endif
assert(refcount>=0); refcount++;
}
bool unref()const
{
#ifdef ETL_LOCK_REFCOUNTS
bool unref()const
{
#ifdef ETL_LOCK_REFCOUNTS
- Glib::Mutex::Lock lock(mutex);
+ synfig::Mutex::Lock lock(mutex);
#endif
assert(refcount>0);
#endif
assert(refcount>0);
#ifdef ETL_SELF_DELETING_SHARED_OBJECT
refcount=-666;
#ifdef ETL_LOCK_REFCOUNTS
#ifdef ETL_SELF_DELETING_SHARED_OBJECT
refcount=-666;
#ifdef ETL_LOCK_REFCOUNTS
#endif
delete this;
#endif
#endif
delete this;
#endif
int count()const
{
#ifdef ETL_LOCK_REFCOUNTS
int count()const
{
#ifdef ETL_LOCK_REFCOUNTS
- Glib::Mutex::Lock lock(mutex);
+ synfig::Mutex::Lock lock(mutex);
#endif
return refcount;
}
#endif
return refcount;
}