xiaoxiang781216 commented on code in PR #10706:
URL: https://github.com/apache/nuttx/pull/10706#discussion_r1375699183
##########
fs/vfs/fs_epoll.c:
##########
@@ -730,22 +823,28 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs,
#endif
ret = nxsem_tickwait(&eph->sem, ticks);
- if (ret == -ETIMEDOUT)
- {
- ret = OK;
- }
}
else
{
ret = nxsem_wait(&eph->sem);
}
- if (ret < 0)
+ if (ret < 0 && ret != -ETIMEDOUT)
{
goto err;
}
+ else /* ret >= 0 or ret == -ETIMEDOUT */
+ {
+ int num = epoll_teardown(eph, evs, maxevents);
+ if (num == 0 && timeout != 0 && ret != -ETIMEDOUT)
Review Comment:
```suggestion
if (num == 0 && ret != -ETIMEDOUT)
```
##########
net/local/local_netpoll.c:
##########
@@ -119,7 +119,10 @@ static void local_inout_poll_cb(FAR struct pollfd *fds)
{
FAR struct pollfd *originfds = fds->arg;
- poll_notify(&originfds, 1, fds->revents);
+ if (fds->revents != 0)
Review Comment:
can we add a flag(e.g. POLLALWAYS)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]