Boost logo

Boost-Build :

Subject: Re: [Boost-build] x86 CPU spinning should use pause
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-09-28 13:12:25

On Wed, 28 Sep 2011, Hite, Christopher wrote:

> #define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );
> We should probably use:
>         __asm__ __volatile__("pause;")
> Why? Because one thread polling( or worse CASing) memory, causes multiple overlapping memory operations to be made:

-- basically, "rep; nop" is exactly the same instruction as "pause".

-- Jeremiah Willcock

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at