From 0ea7d5d6dbd7d48f7d88280dedeba2c1bc36d1ea Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 1 Jun 2008 15:32:42 -0400 Subject: [PATCH] [cairo-mutex] Remove debugging stuff that I accidentally committed We should add read mutex debugging facilities when the debugging infrastructure is in place. --- src/cairo-mutex-type-private.h | 21 +-------------------- 1 file changed, 1 insertion(+), 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 -#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 */