mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Expose internal timer_purge() as isc_timer_purge()
This function is used in a unit test to check for data races.
This commit is contained in:
parent
5ac515de1a
commit
c7b15f1f5a
2 changed files with 24 additions and 0 deletions
|
|
@ -224,6 +224,21 @@ isc_timer_touch(isc_timer_t *timer);
|
|||
*\li Unexpected error
|
||||
*/
|
||||
|
||||
void
|
||||
isc_timer_purge(isc_timer_t *timer);
|
||||
/*%<
|
||||
* Purge timer.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
*\li 'timer' points to a valid timer.
|
||||
*
|
||||
* Ensures:
|
||||
*
|
||||
*\li Any events already posted by the timer are purged.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
isc_timer_destroy(isc_timer_t **timerp);
|
||||
/*%<
|
||||
|
|
|
|||
|
|
@ -469,6 +469,15 @@ isc_timer_touch(isc_timer_t *timer) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
void
|
||||
isc_timer_purge(isc_timer_t *timer) {
|
||||
REQUIRE(VALID_TIMER(timer));
|
||||
|
||||
LOCK(&timer->lock);
|
||||
timer_purge(timer);
|
||||
UNLOCK(&timer->lock);
|
||||
}
|
||||
|
||||
void
|
||||
isc_timer_destroy(isc_timer_t **timerp) {
|
||||
isc_timer_t *timer = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue