Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-20 20:15:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-20 20:15:16 +0400
commit7759b2743a5a41c16fd4ddc2943ba49c70a078b5 (patch)
treea3bafce72aa9900a5b7e40628d09f9a686f49178 /source/blender
parent3758193c18a886faa5bb803dd378f24866e793e5 (diff)
code cleanup: replace PARALLEL define with _OPENMP
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/CMakeLists.txt4
-rw-r--r--source/blender/blenkernel/SConscript4
-rw-r--r--source/blender/blenlib/CMakeLists.txt4
-rw-r--r--source/blender/blenlib/SConscript4
-rw-r--r--source/blender/blenlib/intern/threads.c10
-rw-r--r--source/blender/editors/physics/CMakeLists.txt4
-rw-r--r--source/blender/editors/physics/SConscript4
-rw-r--r--source/blender/editors/render/CMakeLists.txt4
-rw-r--r--source/blender/editors/render/SConscript4
-rw-r--r--source/blender/modifiers/CMakeLists.txt4
10 files changed, 7 insertions, 39 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 67f8f6b4f55..3864fe3b350 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -357,10 +357,6 @@ if(WITH_PYTHON)
endif()
endif()
-if(WITH_OPENMP)
- add_definitions(-DPARALLEL=1)
-endif()
-
if(WITH_MOD_FLUID)
list(APPEND INC
../../../intern/elbeem/extern
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index fb2ed4b6c07..41684e5e535 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -114,10 +114,6 @@ if env['WITH_BF_QUICKTIME']:
if env['WITH_BF_BULLET']:
defs.append('WITH_BULLET')
-if env['OURPLATFORM'] == 'darwin':
- if env['WITH_BF_OPENMP']:
- defs.append('PARALLEL=1')
-
if env['WITH_BF_FLUID']:
defs.append('WITH_MOD_FLUID')
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index a9955f15016..0708b2fed4d 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -167,10 +167,6 @@ if(WITH_BINRELOC)
add_definitions(-DWITH_BINRELOC)
endif()
-if(WITH_OPENMP)
- add_definitions(-DPARALLEL=1)
-endif()
-
if(WIN32)
list(APPEND INC
../../../intern/utfconv
diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript
index 41a9fe9e8b4..0a2c3c0ebca 100644
--- a/source/blender/blenlib/SConscript
+++ b/source/blender/blenlib/SConscript
@@ -50,8 +50,4 @@ if env['OURPLATFORM'] == 'linuxcross':
if env['WITH_BF_OPENMP']:
incs += ' ' + env['BF_OPENMP_INC']
-if env['OURPLATFORM'] == 'darwin':
- if env['WITH_BF_OPENMP']:
- env.Append(CFLAGS=['-DPARALLEL=1'])
-
env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core','player'], priority = [370,230], compileflags =cflags )
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index 84a8af71dd5..e0ea3bbf685 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -53,7 +53,11 @@
# include <sys/time.h>
#endif
-#if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+#if defined(__APPLE__) && defined(_OPENMP) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+# define USE_APPLE_OMP_FIX
+#endif
+
+#ifdef USE_APPLE_OMP_FIX
/* ************** libgomp (Apple gcc 4.2.1) TLS bug workaround *************** */
extern pthread_key_t gomp_tls_key;
static void *thread_tls_data;
@@ -168,7 +172,7 @@ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot)
if (thread_levels == 0) {
MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread);
-#if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+#ifdef USE_APPLE_OMP_FIX
/* workaround for Apple gcc 4.2.1 omp vs background thread bug,
* we copy gomp thread local storage pointer to setting it again
* inside the thread that we start */
@@ -209,7 +213,7 @@ static void *tslot_thread_start(void *tslot_p)
{
ThreadSlot *tslot = (ThreadSlot *)tslot_p;
-#if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
+#ifdef USE_APPLE_OMP_FIX
/* workaround for Apple gcc 4.2.1 omp vs background thread bug,
* set gomp thread local storage pointer which was copied beforehand */
pthread_setspecific(gomp_tls_key, thread_tls_data);
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index 29d8aec4224..3701598f87f 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -54,10 +54,6 @@ if(WITH_MOD_FLUID)
add_definitions(-DWITH_MOD_FLUID)
endif()
-if(WITH_OPENMP)
- add_definitions(-DPARALLEL=1)
-endif()
-
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript
index 7916ea24bde..2583c9f964a 100644
--- a/source/blender/editors/physics/SConscript
+++ b/source/blender/editors/physics/SConscript
@@ -44,10 +44,6 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
incs += ' ' + env['BF_PTHREADS_INC']
-if env['OURPLATFORM'] == 'darwin':
- if env['WITH_BF_OPENMP']:
- defs.append('PARALLEL=1')
-
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt
index f628b2bb210..24015bd4ea3 100644
--- a/source/blender/editors/render/CMakeLists.txt
+++ b/source/blender/editors/render/CMakeLists.txt
@@ -60,10 +60,6 @@ if(WITH_CODEC_QUICKTIME)
add_definitions(-DWITH_QUICKTIME)
endif()
-if(WITH_OPENMP)
- add_definitions(-DPARALLEL=1)
-endif()
-
if(WITH_HEADLESS)
add_definitions(-DWITH_HEADLESS)
endif()
diff --git a/source/blender/editors/render/SConscript b/source/blender/editors/render/SConscript
index 4c5da4dc78a..db968590093 100644
--- a/source/blender/editors/render/SConscript
+++ b/source/blender/editors/render/SConscript
@@ -55,10 +55,6 @@ if env['WITH_BF_QUICKTIME']:
if env['USE_QTKIT']:
env.Append(CFLAGS=['-DUSE_QTKIT'])
-if env['OURPLATFORM'] == 'darwin':
- if env['WITH_BF_OPENMP']:
- env.Append(CFLAGS=['-DPARALLEL=1'])
-
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 9f1361b4909..72d9e320eb4 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -146,8 +146,4 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
-if(WITH_OPENMP)
- add_definitions(-DPARALLEL=1)
-endif()
-
blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}")