On 9 Dec 2013, at 10:01 pm, David Gwynne <[email protected]> wrote:

> 
> On 9 Dec 2013, at 6:59 pm, Bret Lambert <[email protected]> wrote:
> 
>> On Mon, Dec 09, 2013 at 01:55:53PM +1000, David Gwynne wrote:
>>> this is a demonstration of using TIMEOUT_INITIALIZED().
>>> 
>>> because we know the timeout is always set up correctly, we dont
>>> have to test for it all over the place.
>>> 
>> 
>> [a bit of snipping...]
>> 
>>> -   if (timeout_initialized(&rnd_timeout))
>>> -           nanotime(&ts);
>>> +   nanotime(&ts);
>> 
>> I'm not sure you can do this; check revision 1.132 of this file:
>> 
>>   be more careful with nanotime() calls in early entropy storage, since
>>   at least sparc may not have the clock mapped (found by miod).
>>   while here, protect some more timeout_*() calls with timeout_initialized()
>> 
>> Which reversed a diff that did much of what you're doing here.
>> 
>> So calling nanotime without knowing that your clocks are fully wired up
>> appears to be a possibility (or at least was, at one point).
> 
> awesome. ill have a less mechanical look shortly.

how about we check cold there instead?

dlg

Reply via email to