X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fmutex.h;h=4a1052cdaf68221777bf54f99c61c622287a1e69;hp=c61317eed575155ce5174fbfa427ec62a9b2f8ac;hb=5621db270ccbeabc106e0f438941dba6f930652b;hpb=08284a3a20b2cc8606dd90c3c147e2c31d301a61 diff --git a/cinelerra-5.1/guicast/mutex.h b/cinelerra-5.1/guicast/mutex.h index c61317ee..4a1052cd 100644 --- a/cinelerra-5.1/guicast/mutex.h +++ b/cinelerra-5.1/guicast/mutex.h @@ -53,4 +53,40 @@ public: const char *title; }; +#if 0 +#include + +class TMutex : public Mutex +{ // logged +public: + TMutex(const char *title = 0, int recursive = 0) + : Mutex(title, recursive) { + printf("new TMutex(%s) = %p\n", title, this); + } + ~TMutex() { + printf("del TMutex(%s) = %p\n", title, this); + } + int lock(const char *location = 0) { + printf("locking %p: %s\n", this, title); int ret = Mutex::lock(location); + printf("locked %p:%d %s\n", this, ret, title); return ret; + } + int unlock() { + printf("unlocking %p: %s\n", this, title); return Mutex::unlock(); + } + int trylock(const char *location = 0) { + printf("try locking %p: %s\n", this, title); int ret = Mutex::trylock(location); + printf("try locked %p:%d %s\n", this, ret, title); return ret; + } + int reset() { + printf("reset %p: %s\n", this, title); + return Mutex::reset(); + } + int is_locked() { + int ret = Mutex::is_locked(); + printf("is_locked %p:%d %s\n", this, ret, title); + return ret; + } +}; + +#endif #endif