This function is used in a unit test to check for data races.
*\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);
/*%<
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;