33c Subj : Re: Challenge: Multithreading & Synchronization To : comp.programming.threads From : Chris Thomasson Date : Fri May 27 2005 03:29 pm >> I'm relatively new to this group, so if it is customary here to have >> "atomic >> reads and writes" mean "atomic reads and writes with respect to the CPU >> instruction stream", apologies. It's hard to see how this definition of >> "atomic" could be useful or even sensible, but to each his own. > > Sadly, the word "atomic" is used several different ways. OK. Here is a very simple question... static int shared = 0; CPU A -------- for ( ;; ) { shared = 1; } CPU B -------- for ( ;; ) { int local = shared; assert( local == 0 || local == 1 ); } How many existing processors today could trip the assertion? . 0