<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, Blocking</title>
    <link>http://www.mapleprimes.com/posts/35794-Blocking</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 07:40:36 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 07:40:36 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, Blocking</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, Blocking</title>
      <link>http://www.mapleprimes.com/posts/35794-Blocking</link>
    </image>
    <item>
      <title>confused</title>
      <link>http://www.mapleprimes.com/posts/35794-Blocking?ref=Feed:MaplePrimes:Blocking:Comments#comment45151</link>
      <itunes:summary>&lt;p&gt;A curious mix (the logical negation and superfluous parentheses).&amp;nbsp; Ignoring that, I'm failing to see how this can work in Maple.&amp;nbsp; Maybe this is what you had in mind,&lt;/p&gt;
&lt;pre&gt;
cas := proc(x::evaln, tst, new)
&amp;nbsp;&amp;nbsp;&amp;nbsp; eval(x) = tst and `and`(assign(x,new),true)
end proc:

incr := proc(a::evaln, b)
local tmp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tmp := eval(a);
&amp;nbsp;&amp;nbsp;&amp;nbsp; while not cas( a, tmp, tmp+b ) do
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tmp := a;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end do;
&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL;
end proc:

x := 1:
incr(x,1):
x;
                          2
&lt;/pre&gt;</itunes:summary>
      <description>The latest comments added to the Post, Blocking</description>
      <guid>45151</guid>
      <pubDate>Sat, 06 Feb 2010 08:11:20 Z</pubDate>
      <itunes:author>Joe
 Riel
</itunes:author>
      <author>Joe
 Riel
</author>
    </item>
    <item>
      <title>Thanks</title>
      <link>http://www.mapleprimes.com/posts/35794-Blocking?ref=Feed:MaplePrimes:Blocking:Comments#comment45152</link>
      <itunes:summary>&lt;p&gt;Can you tell I write more C code than Maple?&amp;nbsp; Thanks for pointing out the mistakes in my code.&amp;nbsp; I've updated the example.&lt;/p&gt;
&lt;p&gt;Darin&lt;/p&gt;
&lt;p&gt;-- Kernel Developer Maplesoft&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Blocking</description>
      <guid>45152</guid>
      <pubDate>Tue, 09 Feb 2010 18:24:13 Z</pubDate>
      <itunes:author>dohashi</itunes:author>
      <author>dohashi</author>
    </item>
    <item>
      <title>thanks</title>
      <link>http://www.mapleprimes.com/posts/35794-Blocking?ref=Feed:MaplePrimes:Blocking:Comments#comment45153</link>
      <itunes:summary>&lt;p&gt;Thanks.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;At some point I elided a comment about my &lt;b&gt;cas&lt;/b&gt; routine; it is not supposed to represent an atomic cas, but rather tests the basic operation of &lt;b&gt;incr&lt;/b&gt;.&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Blocking</description>
      <guid>45153</guid>
      <pubDate>Tue, 09 Feb 2010 20:30:27 Z</pubDate>
      <itunes:author>Joe
 Riel
</itunes:author>
      <author>Joe
 Riel
</author>
    </item>
  </channel>
</rss>