Subject: Re: [PATCH] make atomic_t volatile on all architectures

From: Chuck Ebbert <[email-masked]>
Date: Thu, 09 Aug 2007 13:36:11 -0400

On 08/09/2007 03:31 AM, Chris Snook wrote:
> 
> Fair enough.  Casting to (volatile int *) will give us the behavior
> people expect when using atomic_t without needing to use inefficient
> barriers.
> 

You can use this forget() macro to make the compiler reread a variable:

#define forget(var) asm volatile ("" : "=m"(var))