LWN.net Logo

I want some of them callbacks!

I want some of them callbacks!

Posted Oct 31, 2002 20:56 UTC (Thu) by zooko (subscriber, #2589)
In reply to: I want some of them callbacks! by IkeTo
Parent article: sys_epoll - making poll fast

I think there is an interesting disconnect between the low-level hackers and the higher level network/application level hackers here. A lot of the interesting projects that I know of (not to mention the ones that I lead myself: Mnet), use select()/poll() interfaces exactly as I've described above -- as nothing more than a way to get at the callbacks which they then immediately de-multiplex back into callbacks. The projects I'm thinking of here are things like Twisted, and E (although the current E implementation doesn't use kernel calls, as it is in Java...).

Regards,

Zooko


(Log in to post comments)

I want some of them callbacks!

Posted Nov 2, 2002 21:15 UTC (Sat) by bronson (subscriber, #4806) [Link]

Maybe IkeTo gave too comprehensive an answer...

Is it too tricky to have the kernel change to user context and invoke a function pointer that I have given it?

Yes.

Whenever the kernel calls user code directly, non-obvious and non-trivial race conditions result. It's a very difficult problem. Much easier to just have the system call return, and then the user can deal with the callbacks however she/he wants.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds