|
|
On 9/12/2011 1:13, Invisible wrote:
> (Think about it; if you did, every multi-threaded application ever written
> would suddenly break when run on a multi-chip or multi-core setup.)
Not really. You have no more likelihood of breaking because of lack of
memory barriers than you have of breaking because you've cached something in
a register during a task switch.
The compiler just has to write memory barrier instructions out when you
access a volatile variable. That's why the keyword is there.
--
Darren New, San Diego CA, USA (PST)
How come I never get only one kudo?
Post a reply to this message
|
|