static isc_result_t create_managers() { isc_result_t result; #ifdef ISC_PLATFORM_USETHREADS ncpus = isc_os_ncpus(); #else ncpus = 1; #endif CHECK(isc_taskmgr_create(mctx, ncpus, 0, &taskmgr)); CHECK(isc_timermgr_create(mctx, &timermgr)); CHECK(isc_socketmgr_create(mctx, &socketmgr)); return (ISC_R_SUCCESS); cleanup: cleanup_managers(); return (result); }
void isc_test_end() { if (taskmgr != NULL) isc_taskmgr_destroy(&taskmgr); if (lctx != NULL) isc_log_destroy(&lctx); if (hash_active) { isc_hash_destroy(); hash_active = ISC_FALSE; } if (ectx != NULL) isc_entropy_detach(&ectx); cleanup_managers(); if (mctx != NULL) isc_mem_destroy(&mctx); }
void dns_test_end() { if (lctx != NULL) isc_log_destroy(&lctx); if (dst_active) { dst_lib_destroy(); dst_active = ISC_FALSE; } if (hash_active) { isc_hash_destroy(); hash_active = ISC_FALSE; } if (ectx != NULL) isc_entropy_detach(&ectx); cleanup_managers(); if (mctx != NULL) isc_mem_destroy(&mctx); }