Hello,
currently I'm working on new ioloop handler which uses epoll(4) API introduced in Linux kernel 2.6. In this API each fd added to fd set by epoll_ctl system call can be accompanied with user supplied data (integer or void pointer). epoll_wait syscall reports arrived events as an array of structures containing event mask and user data.
Attached patch replaces fd and condition parameters passed to io_loop_handle_add() with struct io pointer. Now io_loop_handle_add() can pass this pointer as user data to epoll_ctl syscall and when event arrives we will have corresponding io structure pointer for free withiot traversing possibly long ioloop->ios list.
Please take a look.
Best regards.
-- Andrey Panin | Linux and UNIX system administrator pazke@donpac.ru | PGP key: wwwkeys.pgp.net