[PATCH 1/2] lib: Provide generic atomic64_t implementation

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jun 19 10:46:14 EST 2009


On Thu, 2009-06-18 at 19:55 -0400, Mike Frysinger wrote:
> On Sat, Jun 13, 2009 at 03:10, Paul Mackerras wrote:
> > +typedef struct {
> > +       long long counter;
> > +} atomic64_t;
> 
> lack of volatile seems odd compared to:
> include/linux/types.h:
> typedef struct {
>     volatile int counter;
> } atomic_t;

Since the counter is only accessed within a spinlock, the volatile
wouldn't be very useful here.

Cheers,
Ben.




More information about the Linuxppc-dev mailing list