[Openmp-commits] [openmp] r343869 - [OpenMP] Convert KMP_DYNAMIC_LIB to a 0 or 1 guard everywhere
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Fri Oct 5 10:59:39 PDT 2018
Author: jlpeyton
Date: Fri Oct 5 10:59:39 2018
New Revision: 343869
URL: http://llvm.org/viewvc/llvm-project?rev=343869&view=rev
Log:
[OpenMP] Convert KMP_DYNAMIC_LIB to a 0 or 1 guard everywhere
Modified:
openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp
openmp/trunk/runtime/src/kmp_runtime.cpp
openmp/trunk/runtime/src/kmp_version.cpp
openmp/trunk/runtime/src/z_Windows_NT_util.cpp
Modified: openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp?rev=343869&r1=343868&r2=343869&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp (original)
+++ openmp/trunk/runtime/src/kmp_ftn_cdecl.cpp Fri Oct 5 10:59:39 2018
@@ -15,7 +15,7 @@
#include "kmp_affinity.h"
#if KMP_OS_WINDOWS
-#if defined KMP_WIN_CDECL || !defined KMP_DYNAMIC_LIB
+#if defined KMP_WIN_CDECL || !KMP_DYNAMIC_LIB
#define KMP_FTN_ENTRIES KMP_FTN_UPPER
#endif
#elif KMP_OS_UNIX
Modified: openmp/trunk/runtime/src/kmp_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.cpp?rev=343869&r1=343868&r2=343869&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.cpp (original)
+++ openmp/trunk/runtime/src/kmp_runtime.cpp Fri Oct 5 10:59:39 2018
@@ -552,7 +552,7 @@ static void __kmp_fini_allocator() {
/* ------------------------------------------------------------------------ */
-#ifdef KMP_DYNAMIC_LIB
+#if KMP_DYNAMIC_LIB
#if KMP_OS_WINDOWS
static void __kmp_reset_lock(kmp_bootstrap_lock_t *lck) {
@@ -3543,7 +3543,7 @@ static int __kmp_expand_threads(int nNee
// resizing __kmp_threads does not need additional protection if foreign
// threads are present
-#if KMP_OS_WINDOWS && !defined KMP_DYNAMIC_LIB
+#if KMP_OS_WINDOWS && !KMP_DYNAMIC_LIB
/* only for Windows static library */
/* reclaim array entries for root threads that are already dead */
added = __kmp_reclaim_dead_roots();
@@ -6194,7 +6194,7 @@ void __kmp_internal_end_thread(int gtid_
return;
}
}
-#if defined KMP_DYNAMIC_LIB
+#if KMP_DYNAMIC_LIB
// AC: lets not shutdown the Linux* OS dynamic library at the exit of uber
// thread, because we will better shutdown later in the library destructor.
// The reason of this change is performance problem when non-openmp thread in
@@ -6644,7 +6644,7 @@ static void __kmp_do_serial_initialize(v
__kmp_register_atfork();
#endif
-#if !defined KMP_DYNAMIC_LIB
+#if !KMP_DYNAMIC_LIB
{
/* Invoke the exit handler when the program finishes, only for static
library. For dynamic library, we already have _fini and DllMain. */
Modified: openmp/trunk/runtime/src/kmp_version.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_version.cpp?rev=343869&r1=343868&r2=343869&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_version.cpp (original)
+++ openmp/trunk/runtime/src/kmp_version.cpp Fri Oct 5 10:59:39 2018
@@ -76,7 +76,7 @@
#endif // KMP_LIB_TYPE
// Detect link type (static, dynamic).
-#ifdef KMP_DYNAMIC_LIB
+#if KMP_DYNAMIC_LIB
#define KMP_LINK_TYPE "dynamic"
#else
#define KMP_LINK_TYPE "static"
Modified: openmp/trunk/runtime/src/z_Windows_NT_util.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Windows_NT_util.cpp?rev=343869&r1=343868&r2=343869&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Windows_NT_util.cpp (original)
+++ openmp/trunk/runtime/src/z_Windows_NT_util.cpp Fri Oct 5 10:59:39 2018
@@ -620,7 +620,7 @@ void __kmp_runtime_initialize(void) {
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
/* Set up minimum number of threads to switch to TLS gtid */
-#if KMP_OS_WINDOWS && !defined KMP_DYNAMIC_LIB
+#if KMP_OS_WINDOWS && !KMP_DYNAMIC_LIB
// Windows* OS, static library.
/* New thread may use stack space previously used by another thread,
currently terminated. On Windows* OS, in case of static linking, we do not
More information about the Openmp-commits
mailing list