#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) }
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
#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_ */