Subj : Re: double-checked locking in C To : comp.programming.threads From : David Schwartz Date : Thu Jul 07 2005 05:27 pm "Chris Friesen" wrote in message news:11craebqk6u9v93@corp.supernews.com... > Consider a hypothetical cpu that does everything it can to screw up > programs which are not written to the POSIX standard: It's a multi-cpu > box with no cache coherence. Data is modified in local cache, and random > bits of it get written to main memory. When you release the lock, then > main memory is updated. Random bits of main memory are read into the > local cache, but when you aquire an appropriate lock the local cache gets > updated. Worse, when you release the lock, nothing happens except a marker is placed. When another thread tries to acquire a lock, it waits until all writes made before markers for that lock complete. DS .