X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-usertrace%2Fltt%2Fatomic-ppc.h;h=d72731b9d98130406e3a4a5b6942a86522b2d1e2;hb=61082636055b3f512c35bd127e7a76df2d7998bc;hp=eeafd505836ec339b0e28af79e8b5de4fc2313ba;hpb=4359c2bbb65b481e58f0e088383cdf0af7414dfc;p=lttv.git diff --git a/ltt-usertrace/ltt/atomic-ppc.h b/ltt-usertrace/ltt/atomic-ppc.h index eeafd505..d72731b9 100644 --- a/ltt-usertrace/ltt/atomic-ppc.h +++ b/ltt-usertrace/ltt/atomic-ppc.h @@ -5,9 +5,11 @@ #ifndef _ASM_PPC_ATOMIC_H_ #define _ASM_PPC_ATOMIC_H_ -typedef struct { volatile int counter; } atomic_t; +#ifdef __cplusplus +extern "C" { +#endif -#ifdef __KERNEL__ +typedef struct { volatile int counter; } atomic_t; #define ATOMIC_INIT(i) { (i) } @@ -16,7 +18,7 @@ typedef struct { volatile int counter; } atomic_t; extern void atomic_clear_mask(unsigned long mask, unsigned long *addr); -#ifdef CONFIG_SMP +#if 0 // We only do operation on one CPU at a time (LTT) #define SMP_SYNC "sync" #define SMP_ISYNC "\n\tisync" #else @@ -210,5 +212,8 @@ static __inline__ int atomic_dec_if_positive(atomic_t *v) #define smp_mb__before_atomic_inc() __MB #define smp_mb__after_atomic_inc() __MB -#endif /* __KERNEL__ */ +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + #endif /* _ASM_PPC_ATOMIC_H_ */