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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user