summaryrefslogtreecommitdiff
path: root/src/cairo-mutex-type-private.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-06-01 15:32:42 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-06-01 15:32:42 -0400
commit0ea7d5d6dbd7d48f7d88280dedeba2c1bc36d1ea (patch)
tree206fe182f151cf38e55012bead94eb633c27c3f2 /src/cairo-mutex-type-private.h
parent54f1a426f75ed44ea2d67b605c78951798f4c1d1 (diff)
downloadcairo-0ea7d5d6dbd7d48f7d88280dedeba2c1bc36d1ea.tar.gz
[cairo-mutex] Remove debugging stuff that I accidentally committed
We should add read mutex debugging facilities when the debugging infrastructure is in place.
Diffstat (limited to 'src/cairo-mutex-type-private.h')
-rw-r--r--src/cairo-mutex-type-private.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/cairo-mutex-type-private.h b/src/cairo-mutex-type-private.h
index 0b258db7f..f940829c1 100644
--- a/src/cairo-mutex-type-private.h
+++ b/src/cairo-mutex-type-private.h
@@ -181,26 +181,7 @@ typedef cairo_mutex_impl_t cairo_mutex_t;
#ifdef CAIRO_MUTEX_DEBUG
-# undef CAIRO_MUTEX_LOCK
-# undef CAIRO_MUTEX_UNLOCK
-# define CAIRO_MUTEX_LOCK(mutex) CAIRO_MUTEX_LOG_OP(mutex, "LOCK", CAIRO_MUTEX_IMPL_LOCK)
-# define CAIRO_MUTEX_UNLOCK(mutex) CAIRO_MUTEX_LOG_OP(mutex, "UNLOCK", CAIRO_MUTEX_IMPL_UNLOCK)
-
-#define CAIRO_MUTEX_LOG_OP(mutex, msg, op) \
- do { cairo_mutex_t *__m = &(mutex); CAIRO_MUTEX_LOG(__m, msg); op(*__m); } while (0)
-
-
-#include <execinfo.h>
-#define CAIRO_MUTEX_LOG(mutex, msg) CAIRO_MUTEX_LOG0(mutex, CAIRO_MUTEX_DEBUG, msg)
-#define CAIRO_MUTEX_LOG0(mutex, which, msg) if (mutex == &which) CAIRO_MUTEX_LOG1(mutex, which, msg)
-#define CAIRO_MUTEX_LOG1(mutex, which, msg) \
- do { \
- void *buffer[10]; \
- int nptrs; \
- fprintf (stderr, "" #which " %s\n", msg); \
- nptrs = backtrace(buffer, ARRAY_LENGTH (buffer)); \
- backtrace_symbols_fd (buffer, nptrs, 2); \
- } while (0)
+/* TODO add mutex debugging facilities here (eg deadlock detection) */
#endif /* CAIRO_MUTEX_DEBUG */