Boost C++ Libraries: Ticket #10113: [1.55] no lock-free synchronization on Solaris 10 sparcv9 (sp_counted_base.hpp) https://svn.boost.org/trac10/ticket/10113 <p> I wonder, why lock-free synchronization is not in use on solaris 10 (sparcv9). </p> <p> E.g. check with <a href="http://www.boost.org/doc/libs/1_53_0/doc/html/lockfree/examples.html">http://www.boost.org/doc/libs/1_53_0/doc/html/lockfree/examples.html</a> </p> <p> When i build boost 1.55 with gcc-4.7.2, then i get for </p> <blockquote class="citation"> <p> ./b2 </p> </blockquote> <p> [...] </p> <ul><li>lockfree boost::atomic_flag : no </li></ul><p> But there seems to be some support for cas32 (e.g.) in ./include/boost/smart_ptr/detail/... </p> <p> But in ./include/boost/smart_ptr/detail/sp_counted_base.hpp there is in the sequence of #if...#elif...#else...#endif is: </p> <pre class="wiki">[...] #elif defined( __GNUC__ ) &amp;&amp; ( defined( __mips__ ) || defined( _mips ) ) &amp;&amp; !defined(__PATHSCALE__) # include &lt;boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp&gt; #elif defined( BOOST_SP_HAS_SYNC ) # include &lt;boost/smart_ptr/detail/sp_counted_base_sync.hpp&gt; #elif defined(__GNUC__) &amp;&amp; ( defined( __sparcv9 ) || ( defined( __sparcv8 ) &amp;&amp; ( __GNUC__ * 100 + __GNUC_MINOR__ &gt;= 402 ) ) ) # include &lt;boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp&gt; [...] </pre><p> I.e. BOOST_SP_HAS_SYNC is preferred. </p> <p> Is this correct? </p> <ul><li>many thanks! </li></ul><p> best regards, </p> <p> Frank </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10113 Trac 1.4.3 anonymous Wed, 11 Jun 2014 16:20:41 GMT <link>https://svn.boost.org/trac10/ticket/10113#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10113#comment:1</guid> <description> <p> The strange thing is: when i compile and execute the test module lockfree.cpp manually i get: </p> <pre class="wiki">&gt; g++ -o test -I../../../ lockfree.cpp &gt; ./test lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = char]' atomic&lt;char&gt; is always lock free lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = short int]' atomic&lt;short&gt; is always lock free lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = int]' atomic&lt;int&gt; is always lock free lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = long int]' atomic&lt;long&gt; is always lock free lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = long long int]' atomic&lt;long long&gt; is always lock free lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = void*]' atomic&lt;void *&gt; is always lock free lockfree.cpp(29): test lock_free_macro_val == lock_free_expect failed in function: 'void verify_lock_free(const char*, int, int) [with T = bool]' atomic&lt;bool&gt; is always lock free **** 7 errors detected </pre><p> So always saying "is always lock free" - but the verify_lock_free still fails? </p> <p> rgds, Frank </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 11 Jun 2014 16:37:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10113#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10113#comment:2</guid> <description> <p> i think the #ifdefs for solaris are wrong in lockfree.cpp. </p> <p> In ./include/boost/smart_ptr/detail/sp_counted_base.hpp there is checked for </p> <pre class="wiki">defined( __sparcv9 ) </pre><p> respectively </p> <pre class="wiki">defined( __sparcv8 ) </pre><p> But in lockfree.cpp it's using </p> <pre class="wiki">defined( __sparc_v9__) </pre><p> (only). </p> <p> This is misaligned. </p> <p> But also the gcc is wrong (at least mine - could be wrong build): </p> <p> it uses </p> <pre class="wiki">__sparcv8 </pre><blockquote> <p> on a sparcv9 system </p> </blockquote> <p> rgds, Frank </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 12 Jun 2014 11:38:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10113#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10113#comment:3</guid> <description> <p> Forget about the last issue in previous comment. </p> <p> Being recogized as either <span class="underline">sparcv8 or </span>sparcv9 is an issue of the compile flags - using 32bit or 64bit for compilation: </p> <pre class="wiki">$ echo "" | /usr/local/gcc-4.7.2/bin/g++ -m32 -E -dM - | grep sparc #define sparc 1 #define __sparc__ 1 #define __sparcv8 1 #define __sparc 1 $ echo "" | /usr/local/gcc-4.7.2/bin/g++ -m64 -E -dM - | grep sparc #define sparc 1 #define __sparc__ 1 #define __sparcv9 1 #define __sparc 1 </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Sat, 19 Nov 2016 15:49:26 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/10113#comment:4 https://svn.boost.org/trac10/ticket/10113#comment:4 <ul> <li><strong>owner</strong> set to <span class="trac-author">timblechmann</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">lockfree</span> </li> </ul> Ticket