X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-usertrace%2Fltt%2Fsystem-ppc64.h;h=022ef9206af4c013b3f1e481f3af401c363dc204;hb=2786770231bafe751b79ee829519b6d74a4d7709;hp=5fe605372a5000292374f956d6e7918c28b87091;hpb=60009e261013c6bcbdbaa624eaa4c5225d366aef;p=lttv.git diff --git a/ltt-usertrace/ltt/system-ppc64.h b/ltt-usertrace/ltt/system-ppc64.h index 5fe60537..022ef920 100644 --- a/ltt-usertrace/ltt/system-ppc64.h +++ b/ltt-usertrace/ltt/system-ppc64.h @@ -1,6 +1,10 @@ #ifndef __PPC64_SYSTEM_H #define __PPC64_SYSTEM_H +#ifdef __cplusplus +extern "C" { +#endif + /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -66,7 +70,7 @@ * Inline asm pulled from arch/ppc/kernel/misc.S so ppc64 * is more like most of the other architectures. */ -static __inline__ unsigned long +static inline unsigned long __xchg_u32(volatile int *m, unsigned long val) { unsigned long dummy; @@ -84,7 +88,7 @@ __xchg_u32(volatile int *m, unsigned long val) return (dummy); } -static __inline__ unsigned long +static inline unsigned long __xchg_u64(volatile long *m, unsigned long val) { unsigned long dummy; @@ -108,7 +112,7 @@ __xchg_u64(volatile long *m, unsigned long val) */ extern void __xchg_called_with_bad_pointer(void); -static __inline__ unsigned long +static inline unsigned long __xchg(volatile void *ptr, unsigned long x, int size) { switch (size) { @@ -131,7 +135,7 @@ __xchg(volatile void *ptr, unsigned long x, int size) #define __HAVE_ARCH_CMPXCHG 1 -static __inline__ unsigned long +static inline unsigned long __cmpxchg_u32(volatile int *p, int old, int new) { unsigned int prev; @@ -153,7 +157,7 @@ __cmpxchg_u32(volatile int *p, int old, int new) return prev; } -static __inline__ unsigned long +static inline unsigned long __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) { unsigned long prev; @@ -179,7 +183,7 @@ __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) if something tries to do an invalid cmpxchg(). */ extern void __cmpxchg_called_with_bad_pointer(void); -static __inline__ unsigned long +static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) { switch (size) { @@ -211,4 +215,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) #define arch_align_stack(x) (x) +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + #endif