Boost C++ Libraries: Ticket #2885: [smart_ptr] g++/MIPS support for lockless sp_counted_base https://svn.boost.org/trac10/ticket/2885 <p> Submitting a patch for your consideration. It contains an implementation of a lockless sp_counted_base for g++/MIPS platforms. This code has been used extensively for the last two years without issues. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2885 Trac 1.4.3 David Joyner <david.joyner@…> Tue, 24 Mar 2009 16:40:35 GMT attachment set https://svn.boost.org/trac10/ticket/2885 https://svn.boost.org/trac10/ticket/2885 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_1_38_0.sp_counted_base_mips.patch</span> </li> </ul> Ticket Peter Dimov Tue, 24 Mar 2009 21:32:48 GMT status changed https://svn.boost.org/trac10/ticket/2885#comment:1 https://svn.boost.org/trac10/ticket/2885#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Thanks. </p> <p> Is there a reason you use subu with a temp register instead of addiu with -1 in atomic_decrement? </p> Ticket Peter Dimov Tue, 24 Mar 2009 21:44:59 GMT <link>https://svn.boost.org/trac10/ticket/2885#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:2</guid> <description> <p> Another question... does g++/MIPS implement the <span class="underline">sync intrinsics? </span></p> </description> <category>Ticket</category> </item> <item> <author>David Joyner <david.joyner@…></author> <pubDate>Tue, 24 Mar 2009 21:52:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2885#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:3</guid> <description> <p> No good reason. ;) </p> <p> This inline assembly was originally written for atomic subtraction rather than atomic decrement, thus the extra input parameter to the <span class="underline">asm</span> block. I believe GNU's as converts "subu %0, %1, 1" to "addiu %0, %1, -1" on the fly however I'm okay with changing this to addiu. </p> <p> Would you like to me to reattach the patch? </p> <p> As far as g++/MIPS support for <code>__sync</code>, the newest g++/MIPS toolchain I have access to is 4.1.2 and they are not implemented there. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Tue, 24 Mar 2009 22:10:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2885#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:4</guid> <description> <blockquote class="citation"> <p> Would you like to me to reattach the patch? </p> </blockquote> <p> Yes please. </p> <p> Actually, just attach sp_counted_base_gcc_mips.hpp. The headers have been moved for 1.39 so the patch will not apply cleanly anyway. </p> <p> Are you interested in fixing spinlock.hpp as well? </p> </description> <category>Ticket</category> </item> <item> <author>David Joyner <david.joyner@…></author> <pubDate>Wed, 25 Mar 2009 19:52:42 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/2885 https://svn.boost.org/trac10/ticket/2885 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">sp_counted_base_gcc_mips.hpp</span> </li> </ul> Ticket David Joyner <david.joyner@…> Wed, 25 Mar 2009 19:53:49 GMT <link>https://svn.boost.org/trac10/ticket/2885#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:5</guid> <description> <p> Reattached. </p> <p> We don't use user-mode spinlocks - we don't have the priority schemes in place to make it safe - so I can't help you there. Sorry. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Thu, 26 Mar 2009 00:18:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2885#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:6</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51978" title="Added g++/MIPS support submitted by David Joyner. Refs #2885.">[51978]</a>) Added g++/MIPS support submitted by David Joyner. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2885" title="#2885: Patches: [smart_ptr] g++/MIPS support for lockless sp_counted_base (closed: fixed)">#2885</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Thu, 26 Mar 2009 00:22:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2885#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:7</guid> <description> <p> I've applied your patch to the SVN trunk; thanks again. If everything looks (and tests) OK for you, I'll merge the changes to the release branch so that they surface in 1.39. </p> </description> <category>Ticket</category> </item> <item> <author>David Joyner <david.joyner@…></author> <pubDate>Thu, 26 Mar 2009 04:31:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2885#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:8</guid> <description> <p> Tried the build from SVN trunk. The <code>#include</code> of <code>sp_typeinfo.hpp</code> needs minor fixup: </p> <pre class="wiki">-#include "sp_typeinfo.hpp" +#include &lt;boost/detail/sp_typeinfo.hpp&gt; </pre><p> Compiles fine after that change. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Thu, 26 Mar 2009 12:47:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2885#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2885#comment:9</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/51985" title="Fix sp_typeinfo.hpp include. Refs #2885.">[51985]</a>) Fix sp_typeinfo.hpp include. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2885" title="#2885: Patches: [smart_ptr] g++/MIPS support for lockless sp_counted_base (closed: fixed)">#2885</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Fri, 27 Mar 2009 13:10:48 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2885#comment:10 https://svn.boost.org/trac10/ticket/2885#comment:10 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/52016" title="Merge [51978], [51985] to release. Closes #2885.">[52016]</a>) Merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/51978" title="Added g++/MIPS support submitted by David Joyner. Refs #2885.">[51978]</a>, <a class="changeset" href="https://svn.boost.org/trac10/changeset/51985" title="Fix sp_typeinfo.hpp include. Refs #2885.">[51985]</a> to release. Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2885" title="#2885: Patches: [smart_ptr] g++/MIPS support for lockless sp_counted_base (closed: fixed)">#2885</a>. </p> Ticket