]> git.ipfire.org Git - thirdparty/bind9.git/commit
Return the old counter value in `isc_stats_increment`
authorAydın Mercan <aydin@isc.org>
Tue, 30 Apr 2024 11:37:26 +0000 (14:37 +0300)
committerAydın Mercan <aydin@isc.org>
Fri, 10 May 2024 09:08:52 +0000 (12:08 +0300)
commit09e4fb2ffaeaccf6c74c5aeac7ffa65fc6743b1a
tree2d3cde5b2fa2a2025391be181a936c297dedc069
parentced011f05a0c5ac6e399ec8231dc186c470db175
Return the old counter value in `isc_stats_increment`

Returning the value allows for better high-water tracking without
running into edge cases like the following:

0. The counter is at value X
1. Increment the value (X+1)
2. The value is decreased multiple times in another threads (X+1-Y)
3. Get the value (X+1-Y)
4. Update-if-greater misses the X+1 value which should have been the
   high-water
lib/isc/include/isc/stats.h
lib/isc/stats.c
lib/ns/include/ns/stats.h
lib/ns/stats.c