I want some of them callbacks!
Posted Oct 31, 2002 11:01 UTC (Thu) by
zooko (subscriber, #2589)
Parent article:
sys_epoll - making poll fast
I don't understand why the callbacks aren't propagated to userland. All of my code which uses select() or poll() style interfaces immediately invokes callbacks based on which fds have changed, so if my code ran on top of epoll(), then the sequence of events would look like this:
- the socket activity would cause callbacks
- which would be intercepted by the epoll() system
- which would update the data structure and then return from epoll_wait(),
- where my userland code would crawl the data structure and invoke callbacks for each changed thing,
- where higher-level application code would then receive the callbacks.
Doesn't this seem unnecessarily complicated, not to mention less efficient? Is it too tricky to have the kernel change to user context and invoke a function pointer that I have given it?
Regards,
Zooko
(
Log in to post comments)