diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-17 19:59:22 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-17 19:59:22 +0200 |
commit | ac186f1c3d6d4a8fa4230a205c7fce91b3fef535 (patch) | |
tree | d8e52e481c1c7903d21bbc5e4383299062e85061 /runtime/wtp.h | |
parent | 4c9eded44dbae1701bb3b8f255865892b19e7f72 (diff) | |
download | rsyslog-ac186f1c3d6d4a8fa4230a205c7fce91b3fef535.tar.gz rsyslog-ac186f1c3d6d4a8fa4230a205c7fce91b3fef535.tar.xz rsyslog-ac186f1c3d6d4a8fa4230a205c7fce91b3fef535.zip |
removed mutex locks
... by utilizing that we need to modify a state variable only in
a sequential way during shutdown.
Diffstat (limited to 'runtime/wtp.h')
-rw-r--r-- | runtime/wtp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/wtp.h b/runtime/wtp.h index cff6d3f9..69a05a14 100644 --- a/runtime/wtp.h +++ b/runtime/wtp.h @@ -51,7 +51,7 @@ struct wtp_s { bool bInactivityGuard;/* prevents inactivity due to race condition */ rsRetVal (*pConsumer)(void *); /* user-supplied consumer function for dewtpd messages */ /* synchronization variables */ - pthread_mutex_t mut; /* mutex for the wtp's thread management */ + pthread_mutex_t mutWtp; /* mutex for the wtp's thread management */ pthread_cond_t condThrdTrm;/* signalled when threads terminate */ /* end sync variables */ /* user objects */ @@ -82,7 +82,7 @@ rsRetVal wtpDestruct(wtp_t **ppThis); rsRetVal wtpAdviseMaxWorkers(wtp_t *pThis, int nMaxWrkr); rsRetVal wtpProcessThrdChanges(wtp_t *pThis); rsRetVal wtpSetInactivityGuard(wtp_t *pThis, int bNewState, int bLockMutex); -rsRetVal wtpChkStopWrkr(wtp_t *pThis, int bLockMutex, int bLockUsrMutex); +rsRetVal wtpChkStopWrkr(wtp_t *pThis, int bLockUsrMutex); rsRetVal wtpSetState(wtp_t *pThis, wtpState_t iNewState); rsRetVal wtpWakeupWrkr(wtp_t *pThis); rsRetVal wtpWakeupAllWrkr(wtp_t *pThis); |