Commit 06c29e22 authored by Bob Halley's avatar Bob Halley
Browse files

rwlock macros

parent 2c395a84
......@@ -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 */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment