[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettimeofday seconds rollover problem?



Pavel Pisa wrote:

>Hello All,
>
>On Friday 24 February 2006 18:36, Till Straumann wrote:
>  
>
>
>>
>>      #define _ISR_Disable( _level ) \
>>              _CPU_ISR_Disable( _level ) \
>>              asm volatile("":::"memory")
>>
>>    
>>
>Great.
>
>I have only concern about syntactical correctness of this construct
>and behavior in if() x; else y; flow. I would modify it next way
>
>      #define _ISR_Disable( _level ) \
>              do { _CPU_ISR_Disable( _level ); \
>              asm volatile("":::"memory"); } while(0)
>  
>
Yes, of course, you're right, thanks.

T.