system/uorb:Loop bug fix

Fixed the epoll issue that when multiple events come only the first POLLIN is entered.

Signed-off-by: likun17 <likun17@xiaomi.com>
This commit is contained in:
likun17 2024-11-12 20:58:57 +08:00 committed by Donny(董九柱)
parent 11c8220fd5
commit 3d97bf02e4

View file

@ -105,7 +105,8 @@ static int orb_loop_epoll_run(FAR struct orb_loop_s *loop)
uorberr("epoll wait data in error! fd:%d", handle->fd);
}
}
else if (et[i].events & EPOLLOUT)
if (et[i].events & EPOLLOUT)
{
if (handle->dataout_cb != NULL)
{
@ -116,7 +117,8 @@ static int orb_loop_epoll_run(FAR struct orb_loop_s *loop)
uorberr("epoll wait data out error! fd:%d", handle->fd);
}
}
else if (et[i].events & EPOLLPRI)
if (et[i].events & EPOLLPRI)
{
if (handle->eventpri_cb != NULL)
{
@ -127,7 +129,8 @@ static int orb_loop_epoll_run(FAR struct orb_loop_s *loop)
uorberr("epoll wait events pri error! fd:%d", handle->fd);
}
}
else if (et[i].events & EPOLLERR)
if (et[i].events & EPOLLERR)
{
if (handle->eventerr_cb != NULL)
{