*
*\li counter is less than the maximum available ID for the stats specified
* on creation.
+ */
+
+void
+isc_statsmulti_clear(isc_statsmulti_t *stats);
+/*%<
+ * Set all counters to zero.
+ *
+ * Requires:
+ *\li 'stats' is a valid isc_statsmulti_t.
*/
\ No newline at end of file
}
return total;
}
+
+void
+isc_statsmulti_clear(isc_statsmulti_t *stats) {
+ REQUIRE(ISC_STATSMULTI_VALID(stats));
+
+ /* Clear all counters across all threads */
+ for (int i = 0; i < stats->per_thread_capacity * stats->num_threads; i++) {
+ atomic_store_relaxed(&stats->counters[i], 0);
+ }
+}