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>
*** 23,33 ****
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
! * Copyright (c) 2014, Joyent, Inc. All rights reserved.
*/
/*
* av1394 asynchronous module
*/
--- 23,33 ----
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
! * Copyright 2017 Joyent, Inc.
*/
/*
* av1394 asynchronous module
*/
*** 348,374 ****
AV1394_TNF_EXIT(av1394_async_ioctl);
return (ret);
}
- /*ARGSUSED*/
int
av1394_async_poll(av1394_inst_t *avp, short events, int anyyet, short *reventsp,
struct pollhead **phpp)
{
av1394_async_t *ap = &avp->av_a;
av1394_queue_t *rq = &ap->a_rq;
AV1394_TNF_ENTER(av1394_async_poll);
! if (events & POLLIN) {
! if (av1394_peekq(rq))
*reventsp |= POLLIN;
if ((!*reventsp && !anyyet) || (events & POLLET)) {
mutex_enter(&ap->a_mutex);
ap->a_pollevents |= POLLIN;
*phpp = &ap->a_pollhead;
mutex_exit(&ap->a_mutex);
}
}
--- 348,376 ----
AV1394_TNF_EXIT(av1394_async_ioctl);
return (ret);
}
int
av1394_async_poll(av1394_inst_t *avp, short events, int anyyet, short *reventsp,
struct pollhead **phpp)
{
av1394_async_t *ap = &avp->av_a;
av1394_queue_t *rq = &ap->a_rq;
AV1394_TNF_ENTER(av1394_async_poll);
! if (events & (POLLIN | POLLET)) {
! if ((events & POLLIN) && av1394_peekq(rq)) {
*reventsp |= POLLIN;
+ }
if ((!*reventsp && !anyyet) || (events & POLLET)) {
mutex_enter(&ap->a_mutex);
+ if (events & POLLIN) {
ap->a_pollevents |= POLLIN;
+ }
*phpp = &ap->a_pollhead;
mutex_exit(&ap->a_mutex);
}
}