return ISC_R_NOTIMPLEMENTED;
}
-void
-dns_db_locknode(dns_dbnode_t *node, isc_rwlocktype_t type) {
- REQUIRE(node != NULL && node->methods != NULL);
- if (node->methods->locknode != NULL) {
- (node->methods->locknode)(node, type);
- }
-}
-
-void
-dns_db_unlocknode(dns_dbnode_t *node, isc_rwlocktype_t type) {
- REQUIRE(node != NULL && node->methods != NULL);
- if (node->methods->unlocknode != NULL) {
- (node->methods->unlocknode)(node, type);
- }
-}
-
void
dns_db_expiredata(dns_dbnode_t *node, void *data) {
REQUIRE(node != NULL && node->methods != NULL);
dns_dbnode_t **targetp DNS__DB_FLARG);
void (*detachnode)(dns_dbnode_t **targetp DNS__DB_FLARG);
- void (*locknode)(dns_dbnode_t *node, isc_rwlocktype_t t);
- void (*unlocknode)(dns_dbnode_t *node, isc_rwlocktype_t t);
-
void (*deletedata)(dns_dbnode_t *node, void *data);
void (*expiredata)(dns_dbnode_t *node, void *data);
} dns_dbnode_methods_t;
* dns_rdatasetstats_create(); otherwise NULL.
*/
-void
-dns_db_locknode(dns_dbnode_t *node, isc_rwlocktype_t type);
-void
-dns_db_unlocknode(dns_dbnode_t *node, isc_rwlocktype_t type);
-/*%<
- * Lock/unlock a single node within a database so that data stored
- * there can be manipulated directly.
- */
-
isc_result_t
dns_db_addglue(dns_db_t *db, dns_dbversion_t *version, dns_rdataset_t *rdataset,
dns_message_t *msg);
static void
qpcnode_detachnode(dns_dbnode_t **nodep DNS__DB_FLARG);
static void
-qpcnode_locknode(dns_dbnode_t *node, isc_rwlocktype_t type);
-static void
-qpcnode_unlocknode(dns_dbnode_t *node, isc_rwlocktype_t type);
-static void
qpcnode_deletedata(dns_dbnode_t *node, void *data);
static void
qpcnode_expiredata(dns_dbnode_t *node, void *data);
static dns_dbnode_methods_t qpcnode_methods = (dns_dbnode_methods_t){
.attachnode = qpcnode_attachnode,
.detachnode = qpcnode_detachnode,
- .locknode = qpcnode_locknode,
- .unlocknode = qpcnode_unlocknode,
.deletedata = qpcnode_deletedata,
.expiredata = qpcnode_expiredata,
};
return mu.leaves;
}
-static void
-qpcnode_locknode(dns_dbnode_t *node, isc_rwlocktype_t type) {
- qpcnode_t *qpnode = (qpcnode_t *)node;
- qpcache_t *qpdb = qpnode->qpdb;
-
- RWLOCK(&qpdb->buckets[qpnode->locknum].lock, type);
-}
-
-static void
-qpcnode_unlocknode(dns_dbnode_t *node, isc_rwlocktype_t type) {
- qpcnode_t *qpnode = (qpcnode_t *)node;
- qpcache_t *qpdb = qpnode->qpdb;
-
- RWUNLOCK(&qpdb->buckets[qpnode->locknum].lock, type);
-}
-
isc_result_t
dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *origin,
dns_dbtype_t type, dns_rdataclass_t rdclass,
return ISC_R_SUCCESS;
}
-static void
-locknode(dns_dbnode_t *dbnode, isc_rwlocktype_t type) {
- qpznode_t *node = (qpznode_t *)dbnode;
-
- RWLOCK(qpzone_get_lock(node), type);
-}
-
-static void
-unlocknode(dns_dbnode_t *dbnode, isc_rwlocktype_t type) {
- qpznode_t *node = (qpznode_t *)dbnode;
-
- RWUNLOCK(qpzone_get_lock(node), type);
-}
-
static void
deletedata(dns_dbnode_t *node ISC_ATTR_UNUSED, void *data) {
dns_slabheader_t *header = data;
static dns_dbnode_methods_t qpznode_methods = (dns_dbnode_methods_t){
.attachnode = qpzone_attachnode,
.detachnode = qpzone_detachnode,
- .locknode = locknode,
- .unlocknode = unlocknode,
.deletedata = deletedata,
};