Subj : Re: What is the real costs of LOCK on x86 multiprocesor machine? To : comp.programming.threads From : David Schwartz Date : Sun Jul 31 2005 02:48 pm "chris noonan" wrote in message news:1122812800.698627.9550@g43g2000cwa.googlegroups.com... >> By the way, the way I do this in applications is by using an illegal >> instruction. I catch the fault and replace the illegal instruction with >> either a LOCK or NOP at run time. >> >>[code snipped] > Ingenious. I wonder if there might be a way of doing > this for Microsoft Windows? I never tried. It comes down to whether you can catch the illegal instruction fault with enough information to fix it. My understanding is that you *can* catch faults with something like SetUnhandledExceptionFilter (or some function like that). DS .