diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 12:55:52 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 12:55:52 +0000 |
commit | 32057ac4f9c31cd01e6501b08a60a46a319d8a2c (patch) | |
tree | 25a952fd06e0cfb90a2969512e5cf56e5ba752b1 /debug.c | |
parent | faa334e489a3922df0889ea4144ed311c690d9e7 (diff) | |
download | rsyslog-32057ac4f9c31cd01e6501b08a60a46a319d8a2c.tar.gz rsyslog-32057ac4f9c31cd01e6501b08a60a46a319d8a2c.tar.xz rsyslog-32057ac4f9c31cd01e6501b08a60a46a319d8a2c.zip |
reduced volume of debug output
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -518,7 +518,10 @@ int dbgCondWait(pthread_cond_t *cond, pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD int ret; dbgRecordExecLocation(iStackPtr, ln); dbgMutexUnlockLog(pmut, pFuncDB, ln); - dbgprintf("%s:%d:%s: mutex %p waiting on condition %p\n", pFuncDB->file, pFuncDB->line, pFuncDB->func, (void*)pmut, (void*)cond); + if(bPrintMutexAction) { + dbgprintf("%s:%d:%s: mutex %p waiting on condition %p\n", pFuncDB->file, pFuncDB->line, + pFuncDB->func, (void*)pmut, (void*)cond); + } dbgMutexPreLockLog(pmut, pFuncDB, ln); ret = pthread_cond_wait(cond, pmut); return ret; @@ -532,8 +535,10 @@ int dbgCondTimedWait(pthread_cond_t *cond, pthread_mutex_t *pmut, const struct t dbgRecordExecLocation(iStackPtr, ln); dbgMutexUnlockLog(pmut, pFuncDB, ln); dbgMutexPreLockLog(pmut, pFuncDB, ln); - dbgprintf("%s:%d:%s: mutex %p waiting on condition %p (with timeout)\n", pFuncDB->file, pFuncDB->line, pFuncDB->func, - (void*)pmut, (void*)cond); + if(bPrintMutexAction) { + dbgprintf("%s:%d:%s: mutex %p waiting on condition %p (with timeout)\n", pFuncDB->file, + pFuncDB->line, pFuncDB->func, (void*)pmut, (void*)cond); + } ret = pthread_cond_timedwait(cond, pmut, abstime); dbgMutexLockLog(pmut, pFuncDB, ln); return ret; |