if (!initialize_done)
return (ISC_R_FAILURE);
- isc_refcount_increment(&references);
+ isc_refcount_increment0(&references);
return (ISC_R_SUCCESS);
}
static inline void
new_reference(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
INSIST(!ISC_LINK_LINKED(node, deadlink));
- if (isc_refcount_increment(&node->references) == 0) {
+ if (isc_refcount_increment0(&node->references) == 0) {
/* this is the first reference to the node */
isc_refcount_increment0(&rbtdb->node_locks[node->locknum].references);
}
abort();
}
sock->threadid = gen_threadid(sock);
- isc_refcount_increment(&sock->references);
+ isc_refcount_increment0(&sock->references);
thread = &manager->threads[sock->threadid];
*socketp = (isc_socket_t *)sock;
return;
}
- if (isc_refcount_increment(&sock->references) == 0) {
+ if (isc_refcount_increment0(&sock->references) == 0) {
/*
* Sock is being closed, it will be destroyed, bail.
*/
UNLOCK(&sock->lock);
return (ISC_R_SHUTTINGDOWN);
}
- isc_refcount_increment(&nsock->references);
+ isc_refcount_increment0(&nsock->references);
nsock->statsindex = sock->statsindex;
dev->ev_sender = ntask;
CONSISTENT(sock);
UNLOCK(&sock->lock);
- isc_refcount_increment(&sock->references);
+ isc_refcount_increment0(&sock->references);
*socketp = sock;
}
UNLOCK(&sock->lock);
return (ISC_R_SHUTTINGDOWN);
}
- isc_refcount_increment(&nsock->references);
+ isc_refcount_increment0(&nsock->references);
adev->ev_sender = ntask;
adev->newsocket = nsock;
REQUIRE(VALID_MANAGER(source));
REQUIRE(targetp != NULL && *targetp == NULL);
- oldrefs = isc_refcount_increment(&source->references);
+ oldrefs = isc_refcount_increment0(&source->references);
isc_log_write(ns_lctx, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"clientmgr @%p attach: %d", source, oldrefs + 1);
isc_result_t result;
ns_clientmgr_t *manager;
bool unlock = false;
- int32_t oldrefs;
REQUIRE(managerp != NULL);
manager = *managerp;
isc_task_endexclusive(manager->excl);
}
- oldrefs = isc_refcount_decrement(&manager->references);
- if (oldrefs == 1) {
+ if (isc_refcount_decrement(&manager->references) == 1) {
clientmgr_destroy(manager);
}
if (!initialize_done)
return (ISC_R_FAILURE);
- isc_refcount_increment(&references);
+ isc_refcount_increment0(&references);
return (ISC_R_SUCCESS);
}