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)
This commit is contained in:
@@ -33,9 +33,9 @@ IF(WINDOWS)
|
||||
ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
|
||||
ENDIF(WINDOWS)
|
||||
|
||||
IF(WITH_OPENMP AND NOT APPLE)
|
||||
IF(WITH_OPENMP)
|
||||
ADD_DEFINITIONS(-DPARALLEL=1)
|
||||
ENDIF(WITH_OPENMP AND NOT APPLE)
|
||||
ENDIF(WITH_OPENMP)
|
||||
|
||||
BLENDERLIB_NOLIST(bf_elbeem "${SRC}" "${INC}")
|
||||
#, libtype='blender', priority=0 )
|
||||
|
@@ -8,8 +8,7 @@ sources = env.Glob('intern/*.cpp')
|
||||
defs = 'NOGUI ELBEEM_BLENDER=1'
|
||||
|
||||
if env['WITH_BF_OPENMP']:
|
||||
if env['OURPLATFORM'] != 'darwin':
|
||||
defs += ' PARALLEL'
|
||||
defs += ' PARALLEL'
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
defs += ' USE_MSVC6FIXES'
|
||||
|
Reference in New Issue
Block a user