I'm not sure I understand. I'm assuming you can do
something along the lines of:
// application accepts new socket
new_socket_fd = accept()
// application registers interest with epoll
write(dev_poll_fd, new_socket_fd):
drivers/char/eventpoll.c:ep_insert():
- add new_socket_fd to interest list
- check new_socket_fd for readable, writable, and
error. if any true, then add new event to
event queue, as if the state had changed.
// application asks for current set of events
app: ioctl(dev_poll_fd, EP_POLL):
drivers/char/eventpoll.c:ep_poll():
- return the current event queue
In other words, when new fd's are added to the
interest set, you generate synthetic events which
are returned at the next ioctl(EP_POLL).
Are you saying that isn't possible? It's the
suggested behavior from the BMD paper, so evidently
they got it to work somehow (and I suspect it's how
Solaris /dev/poll works, but I'm not sure)
-- Christopher St. John cks@distributopia.com DistribuTopia http://www.distributopia.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/