[OpenMP] Convert KMP_DYNAMIC_LIB to a 0 or 1 guard everywhere

llvm-svn: 343869
This commit is contained in:
Jonathan Peyton 2018-10-05 17:59:39 +00:00
parent f09fc3bc12
commit 8b3842fc99
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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 nNeed) {
// 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_req) {
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(void) {
__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. */

View File

@ -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"

View File

@ -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