const char *title;
};
+#if 0
+#include <stdio.h>
+
+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