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

clean up; add warnings about use of signal and broadcast

This commit is contained in:
Bob Halley
1998-10-23 18:22:22 +00:00
parent 9fbefe0ace
commit ce1e4ac907

View File

@@ -32,6 +32,10 @@ isc_condition_init(isc_condition_t *cond) {
isc_result_t
isc_condition_signal(isc_condition_t *cond) {
/*
* Unlike pthreads, the caller MUST hold the lock associated with
* the condition variable when calling us.
*/
REQUIRE(cond != NULL);
if (cond->waiters > 0 &&
@@ -46,6 +50,10 @@ isc_condition_signal(isc_condition_t *cond) {
isc_result_t
isc_condition_broadcast(isc_condition_t *cond) {
/*
* Unlike pthreads, the caller MUST hold the lock associated with
* the condition variable when calling us.
*/
REQUIRE(cond != NULL);
if (cond->waiters > 0 &&
@@ -68,8 +76,7 @@ isc_condition_destroy(isc_condition_t *cond) {
return (ISC_R_SUCCESS);
}
static
isc_result_t
static isc_result_t
wait(isc_condition_t *cond, isc_mutex_t *mutex, DWORD milliseconds) {
DWORD result;