The need for poll2()
Colin Plumb (colin@nyx.net)
Sat, 23 Aug 97 10:54:04 MDT
May I suggest a simpler hack? Add a second return value to the poll
system call, which is the index of the first pollfd which has an
event. poll already returns the number of pollfds, and if that
return value is 1, you don't need to scan. If it's more than 1,
you need to scan, but since you've thus managed to avoid another
call to poll, I'm not really worried about it.
That way you can do poll2(), or anything similar, in libc, with
minimal overhead.
Just a suggestion...
--
-Colin