Zebediah Figura : server: Don't poll for POLLOUT if there are alerted write asyncs.
Module: wine Branch: master Commit: c5541f8a0814279e477b4c6199981bbe2d8575a4 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c5541f8a0814279e477b4c619... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu May 5 00:43:28 2022 -0500 server: Don't poll for POLLOUT if there are alerted write asyncs. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/sock.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/sock.c b/server/sock.c index 2bb2963a840..cb76765e495 100644 --- a/server/sock.c +++ b/server/sock.c @@ -1315,7 +1315,12 @@ static int sock_get_poll_events( struct fd *fd ) if (async_queued( &sock->write_q )) { - if (async_waiting( &sock->write_q )) ev |= POLLOUT; + /* As with read asyncs above, clear POLLOUT if we have an alerted + * async. */ + if (async_waiting( &sock->write_q )) + ev |= POLLOUT; + else + ev &= ~POLLOUT; } else if (!sock->wr_shutdown && (mask & AFD_POLL_WRITE)) {
participants (1)
-
Alexandre Julliard