diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 13:45:56 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 13:45:56 +0200 |
commit | 6c6e9a0f3f7d454ba9553a750b195d7f99c7299a (patch) | |
tree | 7b42e894cbc58abc37fd4c9692394db15afb2217 /runtime/queue.c | |
parent | 2ff697fe8de04ecd99e8470a7e7d8d1716980240 (diff) | |
download | rsyslog-6c6e9a0f3f7d454ba9553a750b195d7f99c7299a.tar.gz rsyslog-6c6e9a0f3f7d454ba9553a750b195d7f99c7299a.tar.xz rsyslog-6c6e9a0f3f7d454ba9553a750b195d7f99c7299a.zip |
moved bParseHostname and bIsParsed to msgFlags
This enables us to use more efficient calling conventions and
also helps us keep the on-disk structure of a msg object more
consistent in future releases.
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index b0043ef5..42b8137d 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -49,6 +49,7 @@ #include "obj.h" #include "wtp.h" #include "wti.h" +#include "atomic.h" /* static data */ DEFobjStaticHelpers @@ -996,7 +997,7 @@ queueAdd(queue_t *pThis, void *pUsr) CHKiRet(pThis->qAdd(pThis, pUsr)); if(pThis->qType != QUEUETYPE_DIRECT) { - ++pThis->iQueueSize; + ATOMIC_INC(pThis->iQueueSize); dbgoprint((obj_t*) pThis, "entry added, size now %d entries\n", pThis->iQueueSize); } @@ -1025,7 +1026,7 @@ queueDel(queue_t *pThis, void *pUsr) iRet = queueGetUngottenObj(pThis, (obj_t**) pUsr); } else { iRet = pThis->qDel(pThis, pUsr); - --pThis->iQueueSize; + ATOMIC_DEC(pThis->iQueueSize); } dbgoprint((obj_t*) pThis, "entry deleted, state %d, size now %d entries\n", |