Shachar Shemesh wrote:
- r = epoll_ctl( epoll_fd, EPOLL_CTL_DEL, fd, &eev );
- assert( 0 == r );
This assert still depends on the removal semantics. If it's ok for the users to close the Unix fd before removing it from the poll array, you may find that it's already gone and the assert will fail.
If you like, make that: assert( 0 == r || errno == ENOENT );
I'm going to leave it like it is until I find a case where the fd is closed before it is removed from the pollusers[] array. I think perhaps that cannot and should not happen.
epoll_ev_last = &ev[ret];
There is no need to do that every time.
Oops. I had intended it move it outside of the loop, not just outside the if().
Why not just get rid of epoll_ev_first and epoll_ev_last, and check that pollfd[user]!=0?
Isn't it possible that another fd could be added and fill pollfd[user] after it was removed?
+EXTRACFLAGS="$EXTRACFLAGS -Wsign-compare"
Why is this necessary?
Sorry. Some extra stuff I have in my tree. It shouldn't be in there.
Have you tried running your tests with my patch? I've only run it with IE6 and a few winelib programs.
Just got your last mail regarding races... From what I can see, it should now behave the same way as select_loop().
Todo: * fix init_fd() declaration * get more comment from Alexandre * maybe fix configure tests. My system had sys/epoll.h but no libepoll
Mike