mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 07:35:26 +00:00
Refactor how ADB names and entries are stored in the dns_adb
Replace adb->{names,entries} and related arrays (indexed by hashed bucket) with a isc_ht hash tables storing the new struct adb{name,entry}bucket_t that wraps all the variables that were originally stored in arrays indexed by "bucket" number stored directly in the struct dns_adb. Previously, the task exclusive mode has been used to grow the internal arrays used to store the named and entries objects. The isc_ht hash tables are now protected by the isc_rwlock instead and thus the usage of the task exclusive mode has been removed from the dns_adb. Co-authored-by: Ondřej Surý <ondrej@isc.org>
This commit is contained in:
1827
lib/dns/adb.c
1827
lib/dns/adb.c
File diff suppressed because it is too large
Load Diff
@@ -93,6 +93,8 @@ ISC_LANG_BEGINDECLS
|
|||||||
***/
|
***/
|
||||||
|
|
||||||
typedef struct dns_adbname dns_adbname_t;
|
typedef struct dns_adbname dns_adbname_t;
|
||||||
|
typedef struct dns_adbnamebucket dns_adbnamebucket_t;
|
||||||
|
typedef struct dns_adbentrybucket dns_adbentrybucket_t;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
*\brief
|
*\brief
|
||||||
@@ -116,7 +118,7 @@ struct dns_adbfind {
|
|||||||
/* Private */
|
/* Private */
|
||||||
isc_mutex_t lock; /* locks all below */
|
isc_mutex_t lock; /* locks all below */
|
||||||
in_port_t port;
|
in_port_t port;
|
||||||
int name_bucket;
|
dns_adbnamebucket_t *bucket;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
dns_adbname_t *adbname;
|
dns_adbname_t *adbname;
|
||||||
dns_adb_t *adb;
|
dns_adb_t *adb;
|
||||||
|
Reference in New Issue
Block a user