diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-24 14:01:05 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-24 14:01:05 +0200 |
commit | 0d721450eb9dca0cc5051c7ac9d2570685cce7e5 (patch) | |
tree | 9ad4f4e81aeeaa8cb7379c7c9b407fd97723b029 /action.c | |
parent | 31fae7b93d7aa94b7b3fcbfdf101328230ea6302 (diff) | |
download | rsyslog-0d721450eb9dca0cc5051c7ac9d2570685cce7e5.tar.gz rsyslog-0d721450eb9dca0cc5051c7ac9d2570685cce7e5.tar.xz rsyslog-0d721450eb9dca0cc5051c7ac9d2570685cce7e5.zip |
added missing support for systems without atomic instructions
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -230,6 +230,7 @@ rsRetVal actionConstruct(action_t **ppThis) pThis->iResumeRetryCount = glbliActionResumeRetryCount; pThis->tLastOccur = datetime.GetTime(NULL); /* done once per action on startup only */ pthread_mutex_init(&pThis->mutActExec, NULL); + INIT_ATOMIC_HELPER_MUT(pThis->mutCAS); SYNC_OBJ_TOOL_INIT(pThis); /* indicate we have a new action */ @@ -1386,7 +1387,8 @@ doSubmitToActionQNotAllMarkBatch(action_t *pAction, batch_t *pBatch) } else { bProcessMarkMsgs = 1; } - } while(ATOMIC_CAS(&pAction->f_time, lastAct, ((msg_t*)(pBatch->pElem[i].pUsrp))->ttGenTime, ADDME) == 0); + } while(ATOMIC_CAS(&pAction->f_time, lastAct, + ((msg_t*)(pBatch->pElem[i].pUsrp))->ttGenTime, &pAction->mutCAS) == 0); } if(bProcessMarkMsgs) { pBatch->pElem[i].bFilterOK = 0; |