mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Don't doublelock fdlock on Solaris
This commit is contained in:
committed by
Witold Kręcicki
parent
ca7b5ceee5
commit
3f7d79e574
@@ -736,7 +736,6 @@ watch_fd(isc__socketthread_t *thread, int fd, int msg) {
|
|||||||
pfd.events = POLLOUT;
|
pfd.events = POLLOUT;
|
||||||
pfd.fd = fd;
|
pfd.fd = fd;
|
||||||
pfd.revents = 0;
|
pfd.revents = 0;
|
||||||
LOCK(&thread->fdlock[lockid]);
|
|
||||||
if (write(thread->devpoll_fd, &pfd, sizeof(pfd)) == -1)
|
if (write(thread->devpoll_fd, &pfd, sizeof(pfd)) == -1)
|
||||||
result = isc__errno2result(errno);
|
result = isc__errno2result(errno);
|
||||||
else {
|
else {
|
||||||
@@ -745,7 +744,6 @@ watch_fd(isc__socketthread_t *thread, int fd, int msg) {
|
|||||||
else
|
else
|
||||||
thread->fdpollinfo[fd].want_write = 1;
|
thread->fdpollinfo[fd].want_write = 1;
|
||||||
}
|
}
|
||||||
UNLOCK(&thread->fdlock[lockid]);
|
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
#elif defined(USE_SELECT)
|
#elif defined(USE_SELECT)
|
||||||
@@ -817,7 +815,6 @@ unwatch_fd(isc__socketthread_t *thread, int fd, int msg) {
|
|||||||
* only provides a way of canceling per FD, we may need to re-poll the
|
* only provides a way of canceling per FD, we may need to re-poll the
|
||||||
* socket for the other operation.
|
* socket for the other operation.
|
||||||
*/
|
*/
|
||||||
LOCK(&thread->fdlock[lockid]);
|
|
||||||
if (msg == SELECT_POKE_READ &&
|
if (msg == SELECT_POKE_READ &&
|
||||||
thread->fdpollinfo[fd].want_write == 1) {
|
thread->fdpollinfo[fd].want_write == 1) {
|
||||||
pfds[1].events = POLLOUT;
|
pfds[1].events = POLLOUT;
|
||||||
@@ -839,7 +836,6 @@ unwatch_fd(isc__socketthread_t *thread, int fd, int msg) {
|
|||||||
else
|
else
|
||||||
thread->fdpollinfo[fd].want_write = 0;
|
thread->fdpollinfo[fd].want_write = 0;
|
||||||
}
|
}
|
||||||
UNLOCK(&thread->fdlock[lockid]);
|
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
#elif defined(USE_SELECT)
|
#elif defined(USE_SELECT)
|
||||||
@@ -3134,7 +3130,6 @@ internal_recv(isc__socket_t *sock) {
|
|||||||
dev = ISC_LIST_HEAD(sock->recv_list);
|
dev = ISC_LIST_HEAD(sock->recv_list);
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
goto finish;
|
goto finish;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
socket_log(sock, NULL, IOEVENT,
|
socket_log(sock, NULL, IOEVENT,
|
||||||
|
Reference in New Issue
Block a user