OpenImageIO/oiio — pull request #744 by lgritz (2013-11-19 06:46:19+00:00)
Title: Thread tweaks

* Replace an asm barrier with a more portable gcc intrinsic. Timings appear not to suffer.

* Replace Windows _ReadWriteBarrier with MemoryBarrier; reading docs indicate that RWB only affects compiler semantics, not processor semantics.

* New build flag OIIO_THREAD_ALLOW_DCLP, if set to 0, will modify spin_mutex and spin_rw_mutex to avoid the double checked locking pattern, which we think is correct, but throws off Thread Sanitizer and possibly could be a problem for other tools in the future.

Fixes #720