Provide thread safe access to dns_xfrin_t state

dns_xfrin_t state may be accessed from different threads when
when reporting transfer state.  Ensure access is thread safe by
using atomics and locks where appropriate.
This commit is contained in:
Mark Andrews
2023-07-06 14:00:48 +10:00
committed by Aram Sargsyan
parent 42f41f003e
commit bed4e36c86
2 changed files with 57 additions and 33 deletions

View File

@@ -125,8 +125,8 @@ dns_xfrin_getendserial(const dns_xfrin_t *xfr);
*/
void
dns_xfrin_getstats(const dns_xfrin_t *xfr, unsigned int *nmsgp,
unsigned int *nrecsp, uint64_t *nbytesp);
dns_xfrin_getstats(dns_xfrin_t *xfr, unsigned int *nmsgp, unsigned int *nrecsp,
uint64_t *nbytesp);
/*%<
* Get various statistics values of the xfrin object: number of the received
* messages, number of the received records, number of the received bytes.