Subj : Re: Memory visibility and the C compiler... ( a bit long ) To : comp.programming.threads From : SenderX Date : Mon Jan 17 2005 10:35 am >> paranoid. My library is intended to be used in production server code. I >> figured that if all of my lock-free stuff was totally contained in an >> externally assembled library, most of the issues wrt compiler reordering >> would go away. > > Nothing would go away. Think of JIT inlining and reordering. You're > still making assumption that may not hold. Well, "at least" developers that decide to use my library as a framework for their lock-free algorithms will be able to read my paper ( which will contain links to this thread, and others ) to inform themselves of the possible trap they might be getting themselves into. I am thinking of production code and stability here, so all caveats must be thoroughly listed in my libraries documentation. Thanks for your helpful input Alex. p.s. I believe I am fighting an endless fight that the C compilers will always win. So the best I can do is heavily document the problems. That should be adequate? :O .