<div dir="ltr">and use &#39;gcc_atomic&#39; in platform.hpp just for 4.8.x 4.9.x, <div>  </div><div><br></div><div>#if ((defined(__GNUC__) &amp;&amp; ((__GNUC__ * 100 + __GNUC_MINOR__) &gt;= 407))</div><div><br></div><div>
I don&#39;t know why low version gcc can do the lock free atomic operation, but high version can&#39;t</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 29, 2014 at 11:28 AM, Yi Qingliang <span dir="ltr">&lt;<a href="mailto:niqingliang2003@gmail.com" target="_blank">niqingliang2003@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">hardware: samsung s3c6410<br><br>after updated to latest poky, the boost compile fail!<br><br>error info:<div>
<div>libs/atomic/src/lockpool.cpp:127:5: error: &#39;thread_fence&#39; is not a member of &#39;boost::atomics::detail&#39;<br>
</div><div>libs/atomic/src/lockpool.cpp:138:5: error: &#39;signal_fence&#39; is not a member of &#39;boost::atomics::detail&#39;</div></div><div><br></div><div><br></div><div>after dig into it, I found that:</div><div>the marco &#39;BOOST_ATOMIC_FLAG_LOCK_FREE&#39; is 0, so it don&#39;t include &#39;operations_lockfree.hpp&#39; which has &#39;thread_fence&#39; and &#39;signal_fence&#39;, but pthread.h at line 21.<br>

<br></div><div>in file &#39;caps_gcc_atomic.hpp&#39;, &#39;BOOST_ATOMIC_FLAG_LOCK_FREE&#39; is set to &#39;0&#39;, the author think if &#39;__GCC_ATOMIC_BOOL_LOCK_FREE&#39; is 1, the atomic serial function gcc provided is not lock free.</div>

<div><br></div><div>at the end of &#39;caps_gcc_atomic.hpp&#39;, it defined &#39;BOOST_ATOMIC_THREAD_FENCE&#39; as 2.</div><div><br></div><div>so the conflict is: <b>BOOST_ATOMIC_THREAD_FENCE</b> and <b>BOOST_ATOMIC_FLAG_LOCK_FREE</b></div>

<div><b><br></b></div><div>I don&#39;t know it is the new poky problem, or the boost problem, any idea?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Yi Qingliang</div></font></span></div>

</blockquote></div><br></div>