Re: Double-Checked Locking pattern issue



George wrote:
Yes, Tom.


Do you have more specific ideas about why there is instruction reordering in my situation?

For a specific example, you'll have to

a) Try compiling a few DCL examples with full optimization and check the assembly for reordering (I have observed reorderings when doing similar things). You might have no luck, but that probably means you haven't tried the right example!
b) Get (or write!) some kind of multiprocessor simulator for a particular architecture, and run it against various DCL examples. This might be impractical for you!

If you don't want a specific example, look at the general examples others have posted and use your imagination...

Tom
.



Relevant Pages

  • Re: Double-Checked Locking pattern issue
    ... What is DCL example? ... Do you have more specific ideas about why there is instruction ... assembly for reordering (I have observed reorderings when doing similar ...
    (microsoft.public.vc.language)
  • Re: Double-Checked Locking pattern issue
    ... What is DCL example? ... Do you have more specific ideas about why there is instruction ... assembly for reordering (I have observed reorderings when doing similar ...
    (microsoft.public.vc.language)