Implement getter function for counter limit
This commit is contained in:
@@ -80,6 +80,13 @@ isc_counter_setlimit(isc_counter_t *counter, int limit) {
|
||||
atomic_store(&counter->limit, limit);
|
||||
}
|
||||
|
||||
int
|
||||
isc_counter_getlimit(isc_counter_t *counter) {
|
||||
REQUIRE(VALID_COUNTER(counter));
|
||||
|
||||
return atomic_load_acquire(&counter->limit);
|
||||
}
|
||||
|
||||
void
|
||||
isc_counter_attach(isc_counter_t *source, isc_counter_t **targetp) {
|
||||
REQUIRE(VALID_COUNTER(source));
|
||||
|
||||
@@ -68,6 +68,12 @@ isc_counter_setlimit(isc_counter_t *counter, int limit);
|
||||
* Set the counter limit.
|
||||
*/
|
||||
|
||||
int
|
||||
isc_counter_getlimit(isc_counter_t *counter);
|
||||
/*%<
|
||||
* Get the counter limit.
|
||||
*/
|
||||
|
||||
void
|
||||
isc_counter_attach(isc_counter_t *source, isc_counter_t **targetp);
|
||||
/*%<
|
||||
|
||||
Reference in New Issue
Block a user