diff options
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 611b3f25..218a5db6 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> #ifdef OS_SOLARIS # include <sched.h> @@ -214,7 +215,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); |