2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

rwlock macros

This commit is contained in:
Bob Halley 1998-12-18 21:16:57 +00:00
parent 2c395a842b
commit 06c29e22e0

View File

@ -31,15 +31,15 @@
*/
#define LOCK(lp) \
INSIST(isc_mutex_lock((lp)) == ISC_R_SUCCESS);
INSIST(isc_mutex_lock((lp)) == ISC_R_SUCCESS)
#define UNLOCK(lp) \
INSIST(isc_mutex_unlock((lp)) == ISC_R_SUCCESS);
INSIST(isc_mutex_unlock((lp)) == ISC_R_SUCCESS)
#define BROADCAST(cvp) \
INSIST(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS);
INSIST(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS)
#define SIGNAL(cvp) \
INSIST(isc_condition_signal((cvp)) == ISC_R_SUCCESS);
INSIST(isc_condition_signal((cvp)) == ISC_R_SUCCESS)
#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
@ -49,4 +49,9 @@
#define 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 */