isc_timermgr_t * timermgr;
isc_taskmgr_t * taskmgr;
dns_view_t * view;
- bool frozen;
+ bool frozen;
unsigned int options;
dns_dispatchmgr_t * dispatchmgr;
dns_dispatchset_t * dispatches4;
- bool exclusivev4;
+ bool exclusivev4;
dns_dispatchset_t * dispatches6;
isc_dscp_t querydscp4;
isc_dscp_t querydscp6;
- bool exclusivev6;
+ bool exclusivev6;
unsigned int nbuckets;
fctxbucket_t * buckets;
zonebucket_t * dbuckets;
unsigned int spillat; /* clients-per-query */
unsigned int zspill; /* fetches-per-zone */
- dns_badcache_t * badcache; /* Bad cache. */
+ dns_badcache_t * badcache; /* Bad cache. */
/* Locked by primelock. */
dns_fetch_t * primefetch;
RTRACE("shutdown");
+ LOCK(&res->lock);
if (atomic_compare_exchange_strong(&res->exiting, &is_false, true)) {
RTRACE("exiting");
NULL, true);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
+ UNLOCK(&res->lock);
}
void
*resp = NULL;
if (isc_refcount_decrement(&res->references) == 1) {
+ LOCK(&res->lock);
INSIST(atomic_load_acquire(&res->exiting));
INSIST(res->activebuckets == 0);
+ UNLOCK(&res->lock);
destroy(res);
}
}