aboutsummaryrefslogtreecommitdiff
path: root/iemnet_sender.c
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-09-20 13:14:16 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-09-20 13:14:16 +0000
commitdb1b76de7229926515ceba67fb9f5543883bd3e8 (patch)
tree38d55475c8669fcd8bf2eb4ec157144b5d312bb7 /iemnet_sender.c
parentb027b933a923bdd0baf1847f9884b2b551f5a611 (diff)
debugging levels
svn path=/trunk/externals/iem/iemnet/; revision=14160
Diffstat (limited to 'iemnet_sender.c')
-rw-r--r--iemnet_sender.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iemnet_sender.c b/iemnet_sender.c
index ef2b70a..715bdff 100644
--- a/iemnet_sender.c
+++ b/iemnet_sender.c
@@ -7,7 +7,7 @@
* copyright (c) 2010 IOhannes m zmölnig, IEM
*/
-//#define DEBUG
+#define DEBUGLEVEL 2
#include "iemnet.h"
#include "iemnet_data.h"
@@ -31,8 +31,8 @@
#if IEMNET_HAVE_DEBUG
static int debug_lockcount=0;
-# define LOCK(x) do {pthread_mutex_lock(x); debug_lockcount++; post(" LOCK %d (@%d)", debug_lockcount, __LINE__); } while(0)
-# define UNLOCK(x) do {debug_lockcount--;post("UNLOCK %d (@%d)", debug_lockcount, __LINE__);pthread_mutex_unlock(x);}while(0)
+# define LOCK(x) do {pthread_mutex_lock(x);debug_lockcount++; if(debuglevel&DEBUGLEVEL)post(" LOCK %d (@%s:%d)", debug_lockcount, __FILE__, __LINE__); } while(0)
+# define UNLOCK(x) do {debug_lockcount--;if(debuglevel&DEBUGLEVEL)post("UNLOCK %d (@%s:%d)", debug_lockcount, __FILE__, __LINE__);pthread_mutex_unlock(x);}while(0)
#else
# define LOCK(x) pthread_mutex_lock(x)
# define UNLOCK(x) pthread_mutex_unlock(x)