mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Implement getter function for counter limit
(cherry picked from commit ca7d487357)
This commit is contained in:
parent
5a806910a8
commit
3d0559621b
2 changed files with 13 additions and 0 deletions
|
|
@ -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);
|
||||
/*%<
|
||||
|
|
|
|||
Loading…
Reference in a new issue