Remove extra incrementcounter / decrementcounter functions
This commit is contained in:
@@ -155,18 +155,6 @@ isc_stats_ncounters(isc_stats_t *stats) {
|
||||
return (stats->ncounters);
|
||||
}
|
||||
|
||||
static inline void
|
||||
incrementcounter(isc_stats_t *stats, int counter) {
|
||||
atomic_fetch_add_explicit(&stats->counters[counter], 1,
|
||||
memory_order_relaxed);
|
||||
}
|
||||
|
||||
static inline void
|
||||
decrementcounter(isc_stats_t *stats, int counter) {
|
||||
atomic_fetch_sub_explicit(&stats->counters[counter], 1,
|
||||
memory_order_relaxed);
|
||||
}
|
||||
|
||||
static void
|
||||
copy_counters(isc_stats_t *stats) {
|
||||
int i;
|
||||
@@ -190,7 +178,8 @@ isc_stats_increment(isc_stats_t *stats, isc_statscounter_t counter) {
|
||||
REQUIRE(ISC_STATS_VALID(stats));
|
||||
REQUIRE(counter < stats->ncounters);
|
||||
|
||||
incrementcounter(stats, (int)counter);
|
||||
atomic_fetch_add_explicit(&stats->counters[counter], 1,
|
||||
memory_order_relaxed);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -198,7 +187,8 @@ isc_stats_decrement(isc_stats_t *stats, isc_statscounter_t counter) {
|
||||
REQUIRE(ISC_STATS_VALID(stats));
|
||||
REQUIRE(counter < stats->ncounters);
|
||||
|
||||
decrementcounter(stats, (int)counter);
|
||||
atomic_fetch_sub_explicit(&stats->counters[counter], 1,
|
||||
memory_order_relaxed);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user