[lkml]   [2000]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Dan Kegel wrote:
> [kqueue is] Pretty similar to yours, with the following additions:
> Your proposal seems to only have one stream of available events per
> process. kqueue() returns a handle to an event queue, and kevent()
> takes that handle as a first parameter.
> [kqueue] uses a single call to both bind (or unbind) an array of fd's
> and pick up new events. Probably reduces overhead.
> [kqueue] allows you to watch not just sockets, but also plain files
> or directories. (Hey, haven't we heard people talk about letting apps
> do that under Linux? What interface does that use?)

I forgot to mention:

kqueue lets you associate an arbitrary integer with each event
specification; the integer is returned along with the event.
This is very handy for, say, passing the 'this' pointer of the
object that should handle the event. Yes, you can simulate it
with an array indexed by fd, but I like having it included.

- Dan
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:41    [W:0.050 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site