diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-14 07:14:07 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-14 07:14:07 +0000 |
commit | 3f8f9f142c7bcc9c5dd97708b0611024037f2835 (patch) | |
tree | 931fab2c27775d6851601a31626d2968d3c6cfdc /sync.h | |
parent | 56b149585f193e17690a947a20f451b90f6ab173 (diff) | |
download | rsyslog-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.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |