mainloop: epoll management overhaul, delayed destruction fixes.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Mon, 7 Jan 2013 09:44:38 +0000 (11:44 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Mon, 14 Jan 2013 15:35:25 +0000 (17:35 +0200)
commit33ae6402e9ecd95f67120f2d9b7beeb243b0580b
treedb9cca5f2d1bb459ed70903a5048bc9a1f748a84
parent7c9401e0553364df33ad962a256159f6752dbac3
mainloop: epoll management overhaul, delayed destruction fixes.

Reworked main fdtable and epollfd manipulation to be more consistent
and clearer by separating them out to a set of epoll_* functions of
their own. Planted also quite a number of debug messages to the delete-
code paths.

Also fixed a few delayed destruction corner-case crashes. The code
now uses a dedicated hook for the pending deletion list instead of
reusing the main object hook (which cannot be done in some cases).
This turned the remaining type-specific delete_* functions practically
no-ops (they just unlinked the objects from their repective lists,
also done by the delayed purging code) so they were removed.

Probably we should make delayed destruction readiness more explicit
by putting the common deleted_t fields behind a macro.
src/common/mainloop.c
src/common/tests/mainloop-test.c