Request for review, time_pps_fetch() enhancement

Adrian Chadd adrian at freebsd.org
Tue Feb 12 20:14:23 UTC 2013


On 12 February 2013 08:03, Ian Lepore <ian at freebsd.org> wrote:

>> I agree that for practical means, the _currently_ used compilers should
>> consider the tsleep() call as the sequential point. But then the volatile
>> qualifier cast applied for the given access would not change the code as
>> well.
>>
>
> Doesn't this then imply that essentially every driver has this problem,
> and for that matter, every sequence of code anywhere in the base
> involving "loop while repeatedly sleeping, then waking and checking the
> state of some data for changes"?  I sure haven't seen that many volatile
> qualifiers scattered around the code.

Well, not even that - any cached access (eg to a softc member) after a
mutex operation would be invalid.

Hence why there's supposed to be some specific fairy dust sprinkled
over those functions/inlines to tell the compiler to invalidate local
copies of memory structures.



Adrian


More information about the freebsd-hackers mailing list