Print this page
8634 epoll fails to wake on certain edge-triggered conditions
8635 epoll should not emit POLLNVAL
8636 recursive epoll should emit EPOLLRDNORM
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
*** 8,18 ****
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
! * Copyright 2016 Joyent, Inc.
*/
/*
* Support for the eventfd facility, a Linux-borne facility for user-generated
* file descriptor-based events.
--- 8,18 ----
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/*
! * Copyright 2017 Joyent, Inc.
*/
/*
* Support for the eventfd facility, a Linux-borne facility for user-generated
* file descriptor-based events.
*** 226,237 ****
revents |= POLLRDNORM | POLLIN;
if (state->efd_value < EVENTFD_VALMAX)
revents |= POLLWRNORM | POLLOUT;
! if (!(*reventsp = revents & events) && !anyyet)
*phpp = &state->efd_pollhd;
mutex_exit(&state->efd_lock);
return (0);
}
--- 226,239 ----
revents |= POLLRDNORM | POLLIN;
if (state->efd_value < EVENTFD_VALMAX)
revents |= POLLWRNORM | POLLOUT;
! *reventsp = revents & events;
! if ((*reventsp == 0 && !anyyet) || (events & POLLET)) {
*phpp = &state->efd_pollhd;
+ }
mutex_exit(&state->efd_lock);
return (0);
}