diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-25 11:06:42 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-25 11:06:42 +0200 |
commit | 46024834449840dabf399dda196c9dd11cf78ace (patch) | |
tree | 36dc3dc8f85d756afea2924398d5deb679852026 /runtime/wtp.c | |
parent | c60cbd99df4710545587659be6344392e99745ff (diff) | |
download | rsyslog-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.c | 3 |
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); |