Linus Torvalds <[EMAIL PROTECTED]> 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 | [EMAIL PROTECTED]  | 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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to