summaryrefslogtreecommitdiffstats
path: root/runtime/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-25 11:06:42 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-25 11:06:42 +0200
commit46024834449840dabf399dda196c9dd11cf78ace (patch)
tree36dc3dc8f85d756afea2924398d5deb679852026 /runtime/wtp.c
parentc60cbd99df4710545587659be6344392e99745ff (diff)
downloadrsyslog-46024834449840dabf399dda196c9dd11cf78ace.tar.gz
rsyslog-46024834449840dabf399dda196c9dd11cf78ace.tar.xz
rsyslog-46024834449840dabf399dda196c9dd11cf78ace.zip
added a few atomic operations
mostly to get thread debugger errors clean (plus, of course, it makes things more deterministic)
Diffstat (limited to 'runtime/wtp.c')
-rw-r--r--runtime/wtp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/wtp.c b/runtime/wtp.c
index 267555cd..f5769a72 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -39,6 +39,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#include <atomic.h>
/// TODO: check on solaris if this is any longer needed - I don't think so - rgerhards, 2009-09-20
//#ifdef OS_SOLARIS
@@ -217,7 +218,7 @@ wtpProcessThrdChanges(wtp_t *pThis)
*/
do {
/* reset the change marker */
- pThis->bThrdStateChanged = 0;
+ ATOMIC_STORE_0_TO_INT(pThis->bThrdStateChanged);
/* go through all threads */
for(i = 0 ; i < pThis->iNumWorkerThreads ; ++i) {
wtiProcessThrdChanges(pThis->pWrkr[i], LOCK_MUTEX);