From 4359c2bbb65b481e58f0e088383cdf0af7414dfc Mon Sep 17 00:00:00 2001 From: compudj Date: Fri, 2 Jun 2006 11:43:37 +0000 Subject: [PATCH] update ppc git-svn-id: http://ltt.polymtl.ca/svn@1873 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt-usertrace/ltt-usertrace-fast.c | 15 ++++++++------- ltt-usertrace/{ => ltt}/atomic-ppc.h | 0 ltt-usertrace/{ => ltt}/atomic-ppc64.h | 0 ltt-usertrace/ltt/ltt-usertrace-fast.h | 8 ++++++++ ltt-usertrace/ltt/ltt-usertrace-ppc.h | 6 ++++++ ltt-usertrace/ltt/ltt-usertrace.h | 12 ++---------- 6 files changed, 24 insertions(+), 17 deletions(-) rename ltt-usertrace/{ => ltt}/atomic-ppc.h (100%) rename ltt-usertrace/{ => ltt}/atomic-ppc64.h (100%) diff --git a/ltt-usertrace/ltt-usertrace-fast.c b/ltt-usertrace/ltt-usertrace-fast.c index ba0a2ae9..2d22ce9b 100644 --- a/ltt-usertrace/ltt-usertrace-fast.c +++ b/ltt-usertrace/ltt-usertrace-fast.c @@ -46,8 +46,6 @@ #define _GNU_SOURCE #define LTT_TRACE #define LTT_TRACE_FAST -#include -#include #include #include #include @@ -57,22 +55,25 @@ #include #include #include -#include #include -#include #include #include +#include #include #include -#include +#include +#include +#include +#include +#include // included with hack for powerpc in ltt-usertrace.h #include #include //for get_cycles() -_syscall0(pid_t,gettid) - #include +_syscall0(pid_t,gettid); + #ifdef LTT_SHOW_DEBUG #define dbg_printf(...) printf(__VA_ARGS__) #else diff --git a/ltt-usertrace/atomic-ppc.h b/ltt-usertrace/ltt/atomic-ppc.h similarity index 100% rename from ltt-usertrace/atomic-ppc.h rename to ltt-usertrace/ltt/atomic-ppc.h diff --git a/ltt-usertrace/atomic-ppc64.h b/ltt-usertrace/ltt/atomic-ppc64.h similarity index 100% rename from ltt-usertrace/atomic-ppc64.h rename to ltt-usertrace/ltt/atomic-ppc64.h diff --git a/ltt-usertrace/ltt/ltt-usertrace-fast.h b/ltt-usertrace/ltt/ltt-usertrace-fast.h index b0b0ea5c..b71585a0 100644 --- a/ltt-usertrace/ltt/ltt-usertrace-fast.h +++ b/ltt-usertrace/ltt/ltt-usertrace-fast.h @@ -18,6 +18,14 @@ #include #include #include +#ifdef powerpc +#define __KERNEL__ /* Ugly hack : atomic.h is broken */ +#endif +#include +#ifdef powerpc +#include "ltt/ltt-usertrace-ppc.h" +#undef __KERNEL__ /* Ugly hack : atomic.h is broken */ +#endif #include diff --git a/ltt-usertrace/ltt/ltt-usertrace-ppc.h b/ltt-usertrace/ltt/ltt-usertrace-ppc.h index 015365ea..417eca01 100644 --- a/ltt-usertrace/ltt/ltt-usertrace-ppc.h +++ b/ltt-usertrace/ltt/ltt-usertrace-ppc.h @@ -4,6 +4,12 @@ #ifndef __LTT_USERTRACE_PPC_H #define __LTT_USERTRACE_PPC_H +#ifdef __powerpc64__ +#include "ltt/atomic-ppc64.h" +#else +#include "ltt/atomic-ppc.h" +#endif + static __inline__ unsigned long xchg_u32(volatile void *p, unsigned long val) { diff --git a/ltt-usertrace/ltt/ltt-usertrace.h b/ltt-usertrace/ltt/ltt-usertrace.h index 0f45dff1..eb8f9c85 100644 --- a/ltt-usertrace/ltt/ltt-usertrace.h +++ b/ltt-usertrace/ltt/ltt-usertrace.h @@ -11,18 +11,10 @@ #include #include -#include #include -#include #include -#ifdef powerpc -#define __KERNEL__ /* Ugly hack : atomic.h is broken */ -#endif -#include -#ifdef powerpc -#include "ltt/ltt-usertrace-ppc.h" -#undef __KERNEL__ /* Ugly hack : atomic.h is broken */ -#endif +#include +#include #ifndef min #define min(a,b) ((a)<(b)?(a):(b)) -- 2.34.1