Message ID | 20160726025625.7343-3-brian.brooks@linaro.org |
---|---|
State | Superseded |
Headers | show |
odp_cpu_pause() is api defined here: ./include/odp/api/spec/cpu.h Maxim. On 07/26/16 05:56, Brian Brooks wrote: > Signed-off-by: Brian Brooks <brian.brooks@linaro.org> > --- > platform/linux-generic/arch/default/odp/api/cpu_arch.h | 2 +- > platform/linux-generic/arch/mips64/odp/api/cpu_arch.h | 2 +- > platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h | 2 +- > platform/linux-generic/arch/x86/odp/api/cpu_arch.h | 2 +- > platform/linux-generic/include/odp/api/cpu.h | 5 +++++ > 5 files changed, 9 insertions(+), 4 deletions(-) > > diff --git a/platform/linux-generic/arch/default/odp/api/cpu_arch.h b/platform/linux-generic/arch/default/odp/api/cpu_arch.h > index 22b1da2..0d52616 100644 > --- a/platform/linux-generic/arch/default/odp/api/cpu_arch.h > +++ b/platform/linux-generic/arch/default/odp/api/cpu_arch.h > @@ -13,7 +13,7 @@ extern "C" { > > #define _ODP_CACHE_LINE_SIZE 64 > > -static inline void odp_cpu_pause(void) > +static inline void _odp_cpu_pause(void) > { > } > > diff --git a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h > index 5f4cf39..d984255 100644 > --- a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h > +++ b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h > @@ -17,7 +17,7 @@ extern "C" { > #error Please add support for your arch in cpu_arch.h > #endif > > -static inline void odp_cpu_pause(void) > +static inline void _odp_cpu_pause(void) > { > __asm__ __volatile__ ("nop"); > __asm__ __volatile__ ("nop"); > diff --git a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h > index 22b1da2..0d52616 100644 > --- a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h > +++ b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h > @@ -13,7 +13,7 @@ extern "C" { > > #define _ODP_CACHE_LINE_SIZE 64 > > -static inline void odp_cpu_pause(void) > +static inline void _odp_cpu_pause(void) > { > } > > diff --git a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h > index 44e6b30..4f4dbff 100644 > --- a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h > +++ b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h > @@ -13,7 +13,7 @@ extern "C" { > > #define _ODP_CACHE_LINE_SIZE 64 > > -static inline void odp_cpu_pause(void) > +static inline void _odp_cpu_pause(void) > { > #ifdef __SSE2__ > __asm__ __volatile__ ("pause"); > diff --git a/platform/linux-generic/include/odp/api/cpu.h b/platform/linux-generic/include/odp/api/cpu.h > index d49c782..ae04769 100644 > --- a/platform/linux-generic/include/odp/api/cpu.h > +++ b/platform/linux-generic/include/odp/api/cpu.h > @@ -19,6 +19,11 @@ extern "C" { > > #include <odp/api/cpu_arch.h> > > +static inline void odp_cpu_pause(void) > +{ > + _odp_cpu_pause(); > +} > + > #include <odp/api/spec/cpu.h> > > #ifdef __cplusplus
diff --git a/platform/linux-generic/arch/default/odp/api/cpu_arch.h b/platform/linux-generic/arch/default/odp/api/cpu_arch.h index 22b1da2..0d52616 100644 --- a/platform/linux-generic/arch/default/odp/api/cpu_arch.h +++ b/platform/linux-generic/arch/default/odp/api/cpu_arch.h @@ -13,7 +13,7 @@ extern "C" { #define _ODP_CACHE_LINE_SIZE 64 -static inline void odp_cpu_pause(void) +static inline void _odp_cpu_pause(void) { } diff --git a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h index 5f4cf39..d984255 100644 --- a/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h +++ b/platform/linux-generic/arch/mips64/odp/api/cpu_arch.h @@ -17,7 +17,7 @@ extern "C" { #error Please add support for your arch in cpu_arch.h #endif -static inline void odp_cpu_pause(void) +static inline void _odp_cpu_pause(void) { __asm__ __volatile__ ("nop"); __asm__ __volatile__ ("nop"); diff --git a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h index 22b1da2..0d52616 100644 --- a/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h +++ b/platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h @@ -13,7 +13,7 @@ extern "C" { #define _ODP_CACHE_LINE_SIZE 64 -static inline void odp_cpu_pause(void) +static inline void _odp_cpu_pause(void) { } diff --git a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h index 44e6b30..4f4dbff 100644 --- a/platform/linux-generic/arch/x86/odp/api/cpu_arch.h +++ b/platform/linux-generic/arch/x86/odp/api/cpu_arch.h @@ -13,7 +13,7 @@ extern "C" { #define _ODP_CACHE_LINE_SIZE 64 -static inline void odp_cpu_pause(void) +static inline void _odp_cpu_pause(void) { #ifdef __SSE2__ __asm__ __volatile__ ("pause"); diff --git a/platform/linux-generic/include/odp/api/cpu.h b/platform/linux-generic/include/odp/api/cpu.h index d49c782..ae04769 100644 --- a/platform/linux-generic/include/odp/api/cpu.h +++ b/platform/linux-generic/include/odp/api/cpu.h @@ -19,6 +19,11 @@ extern "C" { #include <odp/api/cpu_arch.h> +static inline void odp_cpu_pause(void) +{ + _odp_cpu_pause(); +} + #include <odp/api/spec/cpu.h> #ifdef __cplusplus
Signed-off-by: Brian Brooks <brian.brooks@linaro.org> --- platform/linux-generic/arch/default/odp/api/cpu_arch.h | 2 +- platform/linux-generic/arch/mips64/odp/api/cpu_arch.h | 2 +- platform/linux-generic/arch/powerpc/odp/api/cpu_arch.h | 2 +- platform/linux-generic/arch/x86/odp/api/cpu_arch.h | 2 +- platform/linux-generic/include/odp/api/cpu.h | 5 +++++ 5 files changed, 9 insertions(+), 4 deletions(-) -- 2.9.0