help-hurd
[Top][All Lists]
Advanced

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

Re: What would it take....


From: Da Zheng
Subject: Re: What would it take....
Date: Wed, 23 Dec 2009 19:28:35 +0800
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Samuel Thibault wrote:
> Samuel Thibault, le Wed 23 Dec 2009 10:26:09 +0100, a écrit :
>> Da Zheng, le Wed 23 Dec 2009 16:46:34 +0800, a écrit :
>>>> If you use volatile, the compiler won't
>>>> optimise instructions so it would "work" too ; note however that it's
>>>> not SMP safe (it may even not be premption-safe, depending on which
>>>> instruction the compiler eventually uses).
>>> We don't need both? If there is only volatile, instructions might be 
>>> executed out of order and compilers might also reorder instructions.
>> Volatile prevents from compiler reorder.
> 
> Oops, sorry, of course not. You need the memory clobber for that. Or use
> a function call and not assume that ordering will be correct for local
> variables.
That's what I expect.

Zheng Da





reply via email to

[Prev in Thread] Current Thread [Next in Thread]