svn commit: r237202 - in projects/calloutng/sys: kern sys
Davide Italiano
davide.italiano at gmail.com
Mon Jun 18 22:08:18 UTC 2012
On Mon, Jun 18, 2012 at 3:40 PM, Attilio Rao <attilio at freebsd.org> wrote:
> 2012/6/17, Davide Italiano <davide at freebsd.org>:
>> Author: davide
>> Date: Sun Jun 17 20:45:45 2012
>> New Revision: 237202
>> URL: http://svn.freebsd.org/changeset/base/237202
>>
>> Log:
>> - Extend the condvar(9) KPI introducing a new cv_timedwait_bt_sig()
>> function so that we can specify timeout precision in terms of struct
>> bintime.
>>
>> - Now seltdwait() takes three argument rather than two so that their
>> consumers can specify if the timeout should be passed as ticks or
>> bintime.
>>
>> - Refactor the kern_select() and the sys_poll() code so that these two
>> services may rely on cv_timedwait_bt_sig() rather than on the previous
>> less
>> precise cv_timedwait_sig().
>>
>> - Rethink the sleepqueue(9) KPI in order to make an attempt of avoiding
>> both code duplication and breakages. Your mileage WILL vary, feel free to
>> comment.
>
> I would still prefer the unified KPI, but at least the committed code
> avoids code-duplication, I appreciate your effort here, thanks.
>
> Why you don't do the same thing for callout_ KPI?
>
> Attilio
>
>
> --
> Peace can only be achieved by understanding - A. Einstein
Attilio,
here you can find a patch:
http://people.freebsd.org/~davide/callout_refactorkpi.diff
I'm not confident enough at this point to break all the
callout_reset_on() stuffs, but at least I thought it's good to provide
a variant of it named callout_reset_direct_on() that takes an additive
parameter so that you can specifiy if you want to execute your callout
directly from hw interrupt context or in SWI thread. I also patched
the callout_reset_on() to always execute in SWI thread, as it has done
until now. Note that this solution is a good compromise among
breakages and code duplication avoidance, even though, as you pointed
out makes the KPI more verbose.
If you want to make a review, feel free.
I've some doubt on the style of the macros I've added, to I cc'ed
Bruce, I guess he's the best person to point me out what I'm doing
wrong.
Thanks for your time,
Davide
More information about the svn-src-projects
mailing list