OSX vs OpenMP : implement workaround to fix crashes when using mop from a background...
authorDamien Plisson <damien.plisson@yahoo.fr>
Thu, 17 Dec 2009 17:05:28 +0000 (17:05 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Thu, 17 Dec 2009 17:05:28 +0000 (17:05 +0000)
commit1975ee5eecc17514b441fb9ac921063c38fcabc4
treeb17498faf199f276e843c30767d6b06577e3c9a1
parent4271a40ee7a53029f04389234278b7f64d834a11
OSX vs OpenMP : implement workaround to fix crashes when using mop from a background thread

Fix# 20043 & 20392

The issue is that OSX lib does not implement TLS (Thread Local Storage), so  libgomp uses pthread functions to read/write thread specific vars.
But this implementation is currently (gcc 4.2) buggy : the write function is called only at lib start (in main thread), and the var is undefined for background thread.

The workaround is to perform this gomp_tls_key var write at beginning of background threads that use openMP. (Currently: render & fluidsim)
intern/elbeem/CMakeLists.txt
intern/elbeem/SConscript
source/blender/editors/CMakeLists.txt
source/blender/editors/physics/SConscript
source/blender/editors/physics/physics_fluid.c
source/blender/editors/screen/SConscript
source/blender/editors/screen/screen_ops.c