Re: Linux's implementation of poll() not scalable?

From: Mark Montague (monty@gg.caltech.edu)
Date: Tue Oct 24 2000 - 20:45:14 EST


Linus Torvalds <torvalds@transmeta.com> writes:

> bind_event(sock, POLLIN, NULL, accept_fn);

[...]

> (In fact, you might as well move the event array completely inside
> "get_event()", because nobody would be supposed to look at the raw array
> any more. So the "get_event()" interface would be even simpler: just a
> timeout, nothing more. Talk about simple programming.

It might be good to have bind_event return any previous accept_fn
that's there, in case a library or something wants to chain a handler
rather than clobbering what's there. Or maybe have a way to query,
although this seems fraught with danger if another thread binds
between a query and a bind.

                                - M

-- 
Mark "Monty" Montague | monty@gg.caltech.edu  | I don't do Windows(tm)
I'm dubious about any company whose assets can be destroyed by rm -rf
	  <URL:http://www.gg.caltech.edu/~monty/monty.shtml>
 X-PGP-Fingerprint: E4 EA 6D B1 82 46 DB A1  B0 FF 60 B9 F9 5D 5C F7
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:15 EST