home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,575 of 33,346   
   Alexander Terekhov to All   
   Re: atomic counter   
   17 Oct 11 14:50:10   
   
   0b751a3e   
   From: terekhov@web.de   
      
   SG wrote:   
   [...]   
   > on. As long as programmers have a vague idea of what a data race is,   
   > what they can do to avoid them (amotics, . . .   
      
   Yeah, right, 'amotics' ;-)   
      
   Lock-free atomics are inherently racy and the default memory model for   
   lock-free atomics shall be the most relaxed one, not sequentially   
   consistency (SC).   
      
   On PPC/POWER/PowerPC, for SC, you would need most heavy fence 'hwsync'   
   between each pair of SC lock-free atomic operations, there are examples   
   showing this for each pair: RR, RW, WR, and WW.   
      
   Lock-based atomics do not need 'hwsync' instruction but nobody needs   
   lock-based atomics because locking can be done more efficiently on   
   higher level.   
      
   regards,   
   alexander.   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca