summaryrefslogtreecommitdiffstats
path: root/sync.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-14 07:14:07 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-14 07:14:07 +0000
commit3f8f9f142c7bcc9c5dd97708b0611024037f2835 (patch)
tree931fab2c27775d6851601a31626d2968d3c6cfdc /sync.h
parent56b149585f193e17690a947a20f451b90f6ab173 (diff)
downloadrsyslog-3f8f9f142c7bcc9c5dd97708b0611024037f2835.tar.gz
rsyslog-3f8f9f142c7bcc9c5dd97708b0611024037f2835.tar.xz
rsyslog-3f8f9f142c7bcc9c5dd97708b0611024037f2835.zip
fixed problem when compiling for single threading, fixed bug when compiling
for release build
Diffstat (limited to 'sync.h')
-rw-r--r--sync.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sync.h b/sync.h
index 8a0210a7..95e77165 100644
--- a/sync.h
+++ b/sync.h
@@ -34,11 +34,11 @@
#define SYNC_OBJ_TOOL_INIT(x) SyncObjInit(&((x)->Sync_mut))
#define SYNC_OBJ_TOOL_EXIT(x) SyncObjExit(&((x)->Sync_mut))
-/* If we run in non-debug mode, we use inline code for the mutex
+/* If we run in non-debug (release) mode, we use inline code for the mutex
* operations. If we run in debug mode, we use functions, because they
- * are better to trace in the callframe.
+ * are better to trace in the stackframe.
*/
-#ifndef NDEBUG
+#ifdef NDEBUG
#define LockObj(x) pthread_mutex_lock((x)->Sync_mut)
#define UnlockObj(x) pthread_mutex_unlock((x)->Sync_mut)
#else
@@ -53,8 +53,8 @@ extern void unlockObj(pthread_mutex_t *mut);
#else /* Code not to compile for threading support */
#define SYNC_OBJ_TOOL
-#define SYNC_OBJ_TOOL_INIT
-#define SYNC_OBJ_TOOL_EXIT
+#define SYNC_OBJ_TOOL_INIT(x)
+#define SYNC_OBJ_TOOL_EXIT(X)
#define LockObj(x)
#define UnlockObj(x)
#endif