diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-31 07:26:43 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-31 07:26:43 +0000 |
commit | af1b9c5140e0258d4576568968337cc77b016cd7 (patch) | |
tree | b9c44819b409af5fe3f5e08b599d0eff9eb14037 /debug.c | |
parent | c3460c09e709c4582c871e9c61d6a16abca33411 (diff) | |
download | rsyslog-af1b9c5140e0258d4576568968337cc77b016cd7.tar.gz rsyslog-af1b9c5140e0258d4576568968337cc77b016cd7.tar.xz rsyslog-af1b9c5140e0258d4576568968337cc77b016cd7.zip |
added initial support for atomic operations
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -32,8 +32,6 @@ * * A copy of the GPL can be found in the file "COPYING" in this distribution. */ - - #include "config.h" /* autotools! */ #include <stdio.h> #include <stdlib.h> @@ -47,6 +45,7 @@ #include "rsyslog.h" #include "debug.h" +#include "atomic.h" #include "obj.h" @@ -992,7 +991,7 @@ int dbgEntrFunc(dbgFuncDB_t **ppFuncDB, const char *file, const char *func, int } /* when we reach this point, we have a fully-initialized FuncDB! */ - pFuncDB->nTimesCalled++; + ATOMIC_INC(pFuncDB->nTimesCalled); if(bLogFuncFlow && dbgPrintNameIsInList((const uchar*)pFuncDB->file, printNameFileRoot)) dbgprintf("%s:%d: %s: enter\n", pFuncDB->file, pFuncDB->line, pFuncDB->func); if(pThrd->stackPtr >= (int) (sizeof(pThrd->callStack) / sizeof(dbgFuncDB_t*))) { |