mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:15:18 +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:
1875
lib/dns/adb.c
1875
lib/dns/adb.c
File diff suppressed because it is too large
Load Diff
@@ -92,7 +92,9 @@ ISC_LANG_BEGINDECLS
|
|||||||
*** TYPES
|
*** TYPES
|
||||||
***/
|
***/
|
||||||
|
|
||||||
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
|
||||||
@@ -114,13 +116,13 @@ struct dns_adbfind {
|
|||||||
ISC_LINK(dns_adbfind_t) publink; /*%< RW: client use */
|
ISC_LINK(dns_adbfind_t) publink; /*%< RW: client use */
|
||||||
|
|
||||||
/* 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;
|
||||||
isc_event_t event;
|
isc_event_t event;
|
||||||
ISC_LINK(dns_adbfind_t) plink;
|
ISC_LINK(dns_adbfind_t) plink;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user