mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
rwlock macros
This commit is contained in:
@@ -31,15 +31,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define LOCK(lp) \
|
#define LOCK(lp) \
|
||||||
INSIST(isc_mutex_lock((lp)) == ISC_R_SUCCESS);
|
INSIST(isc_mutex_lock((lp)) == ISC_R_SUCCESS)
|
||||||
#define UNLOCK(lp) \
|
#define UNLOCK(lp) \
|
||||||
INSIST(isc_mutex_unlock((lp)) == ISC_R_SUCCESS);
|
INSIST(isc_mutex_unlock((lp)) == ISC_R_SUCCESS)
|
||||||
#define BROADCAST(cvp) \
|
#define BROADCAST(cvp) \
|
||||||
INSIST(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS);
|
INSIST(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS)
|
||||||
#define SIGNAL(cvp) \
|
#define SIGNAL(cvp) \
|
||||||
INSIST(isc_condition_signal((cvp)) == ISC_R_SUCCESS);
|
INSIST(isc_condition_signal((cvp)) == ISC_R_SUCCESS)
|
||||||
#define WAIT(cvp, lp) \
|
#define WAIT(cvp, lp) \
|
||||||
INSIST(isc_condition_wait((cvp), (lp)) == ISC_R_SUCCESS);
|
INSIST(isc_condition_wait((cvp), (lp)) == ISC_R_SUCCESS)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* isc_condition_waituntil can return ISC_R_TIMEDOUT, so we
|
* isc_condition_waituntil can return ISC_R_TIMEDOUT, so we
|
||||||
@@ -49,4 +49,9 @@
|
|||||||
#define WAITUNTIL(cvp, lp, tp) \
|
#define WAITUNTIL(cvp, lp, tp) \
|
||||||
isc_condition_waituntil((cvp), (lp), (tp))
|
isc_condition_waituntil((cvp), (lp), (tp))
|
||||||
|
|
||||||
|
#define RWLOCK(lp, t) \
|
||||||
|
INSIST(isc_rwlock_lock((lp), (t)) == ISC_R_SUCCESS)
|
||||||
|
#define RWUNLOCK(lp, t) \
|
||||||
|
INSIST(isc_rwlock_unlock((lp), (t)) == ISC_R_SUCCESS)
|
||||||
|
|
||||||
#endif /* ISC_UTIL_H */
|
#endif /* ISC_UTIL_H */
|
||||||
|
Reference in New Issue
Block a user