56f Subj : Re: double-checked locking in C To : comp.programming.threads From : Joe Seigh Date : Wed Jul 06 2005 11:37 am Laurent Deniau wrote: > Joe Seigh wrote: >> No, sorry. The burden of proof is on you. And the reason I posted the >> URL is so we don't have to disprove every bogus DCL implementation there >> is over and over again. > > > How I can I prove that there is no bogus? If the DCL code shown is so > easy to break, show me a sequence of actions (points). I can detail all > steps for different cases, but it will be much longer than showing a > single bogus case, if any. > >> Another URL you can check out >> http://www.nwcpp.org/Downloads/2004/DCLP_notes.pdf > > > Thanks, but at first quick reading, I still do not see problems. > The basic pattern is a) store object state b) store flag and c) read flag d) read object state and dcl depends on if a thread sees the new value of flag, then it will see all the new values of the object state. That depends on (a) occurring before (b) and on (c) occurring before (d). You haven't shown the former, (a) occurs before (b). That you don't see the problem doesn't prove anything. Show us the mechanism that guarantees (a) occurs in memory before (b). -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. . 0