compacter code.

SVN revision: 55107
This commit is contained in:
Carsten Haitzler 2010-12-01 03:31:55 +00:00
parent 1d759c88d1
commit a0f2602c29
1 changed files with 10 additions and 27 deletions

View File

@ -320,6 +320,7 @@ static inline int _ecore_main_fdh_poll_mark_active(void)
for (i = 0; i < ret; i++)
{
Ecore_Fd_Handler *fdh;
Eina_Bool pst, st;
fdh = ev[i].data.ptr;
if (!ECORE_MAGIC_CHECK(fdh, ECORE_MAGIC_FD_HANDLER))
@ -333,33 +334,15 @@ static inline int _ecore_main_fdh_poll_mark_active(void)
ERR("deleted fd in epoll");
continue;
}
if (ev[i].events & EPOLLIN)
{
if (!fdh->read_active)
{
fdh->read_active = EINA_TRUE;
if ((!fdh->write_active) && (!fdh->error_active))
fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
}
}
if (ev[i].events & EPOLLOUT)
{
if (!fdh->write_active)
{
fdh->write_active = EINA_TRUE;
if ((!fdh->read_active) && (!fdh->error_active))
fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
}
}
if (ev[i].events & EPOLLERR)
{
if (!fdh->error_active)
{
fdh->error_active = EINA_TRUE;
if ((!fdh->read_active) && (!fdh->write_active))
fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
}
}
pst = st = fdh->read_active | fdh->write_active | fdh->error_active;
if ((ev[i].events & EPOLLIN) && (!fdh->read_active))
st = fdh->read_active = EINA_TRUE;
if ((ev[i].events & EPOLLOUT) && (!fdh->write_active))
st = fdh->write_active = EINA_TRUE;
if ((ev[i].events & EPOLLERR) && (!fdh->error_active))
st = fdh->error_active = EINA_TRUE;
if (pst != st)
fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
}
return ret;