summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-01-19 15:24:16 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-01-19 15:24:16 +0100
commit3fe63651667d3b74c2f9c97824cb9ed65913a99e (patch)
tree918889a059e7c85c351715f48adf26758df9a251 /action.c
parent4124fa03f6ce58893642342a48eee5fe0cf5d478 (diff)
downloadrsyslog-3fe63651667d3b74c2f9c97824cb9ed65913a99e.tar.gz
rsyslog-3fe63651667d3b74c2f9c97824cb9ed65913a99e.tar.xz
rsyslog-3fe63651667d3b74c2f9c97824cb9ed65913a99e.zip
refactor: remove very old sync.[ch] system for "abstracting" mutex access
This was a bad idea that never was used much.
Diffstat (limited to 'action.c')
-rw-r--r--action.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/action.c b/action.c
index a098eaae..b2620f6e 100644
--- a/action.c
+++ b/action.c
@@ -305,7 +305,7 @@ rsRetVal actionDestruct(action_t *pThis)
if(pThis->f_pMsg != NULL)
msgDestruct(&pThis->f_pMsg);
- SYNC_OBJ_TOOL_EXIT(pThis);
+ pthread_mutex_destroy(&pThis->mutAction);
pthread_mutex_destroy(&pThis->mutActExec);
d_free(pThis->pszName);
d_free(pThis->ppTpl);
@@ -344,8 +344,8 @@ rsRetVal actionConstruct(action_t **ppThis)
pThis->bRepMsgHasMsg = 0;
pThis->tLastOccur = datetime.GetTime(NULL); /* done once per action on startup only */
pthread_mutex_init(&pThis->mutActExec, NULL);
+ pthread_mutex_init(&pThis->mutAction, NULL);
INIT_ATOMIC_HELPER_MUT(pThis->mutCAS);
- SYNC_OBJ_TOOL_INIT(pThis);
/* indicate we have a new action */
++iActionNbr;
@@ -1800,10 +1800,10 @@ doSubmitToActionQComplexBatch(action_t *pAction, batch_t *pBatch)
{
DEFiRet;
- LockObj(pAction);
- pthread_cleanup_push(mutexCancelCleanup, pAction->Sync_mut);
+ d_pthread_mutex_lock(&pAction->mutAction);
+ pthread_cleanup_push(mutexCancelCleanup, &pAction->mutAction);
iRet = helperSubmitToActionQComplexBatch(pAction, pBatch);
- UnlockObj(pAction);
+ d_pthread_mutex_unlock(&pAction->mutAction);
pthread_cleanup_pop(0); /* remove mutex cleanup handler */
RETiRet;