<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fun programming problem: a simple lock-free algorithm</title><link>http://blogs.msdn.com/ericeil/archive/2007/10/26/fun-programming-problem-a-simple-lock-free-algorithm.aspx</link><description>Can the program below ever print “oops?” #include &amp;lt;stdio.h&amp;gt; #include &amp;lt;process.h&amp;gt; struct Globals { volatile int start; int a; int b; volatile int end; }; Globals globals; void WriterThread( void *) { int i = 0; while ( true ) { globals.start</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator></channel></rss>