mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Get rid of locking during UDP and TCP listen
We already have a synchronization mechanism when starting the UDP and TCP listener children - barriers. Change how we start the first-born child (tid == 0), so we don't have to race for sock->parent->result and sock->parent->fd.
This commit is contained in:
@@ -663,8 +663,6 @@ nmsocket_cleanup(isc_nmsocket_t *sock) {
|
||||
|
||||
sock->magic = 0;
|
||||
|
||||
isc_mutex_destroy(&sock->lock);
|
||||
|
||||
/* Don't free child socket */
|
||||
if (sock->parent == NULL) {
|
||||
REQUIRE(sock->tid == isc_tid());
|
||||
@@ -858,8 +856,6 @@ isc___nmsocket_init(isc_nmsocket_t *sock, isc__networker_t *worker,
|
||||
.active_link = ISC_LINK_INITIALIZER,
|
||||
};
|
||||
|
||||
isc_mutex_init(&sock->lock);
|
||||
|
||||
if (iface != NULL) {
|
||||
family = iface->type.sa.sa_family;
|
||||
sock->iface = *iface;
|
||||
|
Reference in New Issue
Block a user