Subject: Re: M:N and blocking ops without SA, AIO
To: Matt Thomas <matt@3am-software.com>
From: Jonathan Stone <jonathan@Pescadero.dsg.stanford.edu>
List: tech-kern
Date: 03/01/2007 17:39:34
In message <45E77377.8040308@3am-software.com>Matt Thomas writes
>Jason Thorpe wrote:
>
>Me too. I'd like to see kcont, softintr, and callouts all use a similar
>if not the same callback signature.
Hi Matt,
One of hte key aspects of kcont(9) is that it takes a callback similar
to softints, or callouts, *plus* something more. I called that
"something more" an "environment" variable, because that's the common
term in theoretical study of programming languages.
Think currying. If I said "currying!", Thor would appreciate why
kcont(9) callbacks have one extra argument than softintr or callout
callbacks; but I'm not sure who else here would.
Yes, you could remove the extra argument, dumbing donw kcont(9)
callbacks to be just like sofintr callbacks; but that would cripple
the uses for which I designed kcont(9), and for which I used a
predecessor: splice() or sendfile().
I'd be happy to see generic softintr callbacks take an extra argument.
But that argument would be NULL for all existing, non-kcont uses.
That sounds like wasted verbiage to me; how about you?