On 07/29/2013 07:31 AM, Manoj Gudi wrote:
> That sounds good.

I second that. Just ifdef the pause for the fix.

For a little extra information here. The thread pools in Theron can have
different yield strategies. GRAS happens to use by default the condition
variable strategy. So the code in question actually has zero impact at
runtime unless a spin lock yield is requested.

Beyond just compiling, in the near future, we will get to test questions
like. Which strategy works better on arm? And that yield code in
particular, what in particular would be most optimal for arm.

Some relevant links.
http://docs.theron-library.com/5.01/structTheron_1_1Framework_1_1Parameters.html
https://github.com/guruofquality/gras/wiki/Threading

-josh

> 
> From: manojgudi <manoj.p.g...@gmail.com>
> Date: Mon, 29 Jul 2013 17:00:35 +0530
> Subject: [PATCH] fixed ASM
> 
> ---
>  Include/Theron/Detail/Threading/Utils.h |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Include/Theron/Detail/Threading/Utils.h
> b/Include/Theron/Detail/Threading/Utils.h
> index 8c6baf2..e2811f1 100644
> --- a/Include/Theron/Detail/Threading/Utils.h
> +++ b/Include/Theron/Detail/Threading/Utils.h
> @@ -168,8 +168,11 @@ THERON_FORCEINLINE void Utils::YieldToHyperthread()
>      YieldProcessor();
> 
>  #elif THERON_GCC
> -
> -    __asm__ __volatile__ ("pause");
> +    #ifdef __arm__
> +        __asm__ __volatile__ ("NOP");
> +    #elif __X86_64__
> +           __asm__ __volatile__("pause");
> +    #endif
> 
>  #endif
> 
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to