[Openmp-commits] [openmp] r238221 - Change macro GUIDEDLL_EXPORTS to KMP_DYNAMIC_LIB

Jonathan Peyton jonathan.l.peyton at intel.com
Tue May 26 10:32:53 PDT 2015


Author: jlpeyton
Date: Tue May 26 12:32:53 2015
New Revision: 238221

URL: http://llvm.org/viewvc/llvm-project?rev=238221&view=rev
Log:
Change macro GUIDEDLL_EXPORTS to KMP_DYNAMIC_LIB

A while back, Hal suggested updating the GUIDEDLL_EXPORTS macro guard to 
a more descriptive name.  It represents a dynamic library build so 
KMP_DYNAMIC_LIB is a more suitable name.

Differential Revision: http://reviews.llvm.org/D9899

Modified:
    openmp/trunk/runtime/cmake/Definitions.cmake
    openmp/trunk/runtime/src/kmp_ftn_cdecl.c
    openmp/trunk/runtime/src/kmp_runtime.c
    openmp/trunk/runtime/src/kmp_version.c
    openmp/trunk/runtime/src/makefile.mk
    openmp/trunk/runtime/src/z_Windows_NT_util.c

Modified: openmp/trunk/runtime/cmake/Definitions.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/Definitions.cmake?rev=238221&r1=238220&r2=238221&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/Definitions.cmake (original)
+++ openmp/trunk/runtime/cmake/Definitions.cmake Tue May 26 12:32:53 2015
@@ -84,7 +84,7 @@ function(append_cpp_flags input_cpp_flag
     ##################################
     # Other conditional definitions
     append_definitions("-D KMP_USE_ASSERT")
-    append_definitions("-D GUIDEDLL_EXPORTS") 
+    append_definitions("-D KMP_DYNAMIC_LIB") 
     if(${STUBS_LIBRARY}) 
         append_definitions("-D KMP_STUB") 
     endif()

Modified: openmp/trunk/runtime/src/kmp_ftn_cdecl.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_ftn_cdecl.c?rev=238221&r1=238220&r2=238221&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_ftn_cdecl.c (original)
+++ openmp/trunk/runtime/src/kmp_ftn_cdecl.c Tue May 26 12:32:53 2015
@@ -16,7 +16,7 @@
 #include "kmp.h"
 
 #if KMP_OS_WINDOWS
-#   if defined  KMP_WIN_CDECL ||  !defined GUIDEDLL_EXPORTS
+#   if defined  KMP_WIN_CDECL ||  !defined KMP_DYNAMIC_LIB
 #       define KMP_FTN_ENTRIES      KMP_FTN_UPPER
 #   endif
 #elif KMP_OS_UNIX

Modified: openmp/trunk/runtime/src/kmp_runtime.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_runtime.c?rev=238221&r1=238220&r2=238221&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c (original)
+++ openmp/trunk/runtime/src/kmp_runtime.c Tue May 26 12:32:53 2015
@@ -557,7 +557,7 @@ static void __kmp_fini_allocator_thread(
 
 /* ------------------------------------------------------------------------ */
 
-#ifdef GUIDEDLL_EXPORTS
+#ifdef KMP_DYNAMIC_LIB
 # if KMP_OS_WINDOWS
 
 
@@ -681,7 +681,7 @@ DllMain( HINSTANCE hInstDLL, DWORD fdwRe
 }
 
 # endif /* KMP_OS_WINDOWS */
-#endif /* GUIDEDLL_EXPORTS */
+#endif /* KMP_DYNAMIC_LIB */
 
 
 /* ------------------------------------------------------------------------ */
@@ -3507,7 +3507,7 @@ __kmp_expand_threads(int nWish, int nNee
 
     if(nNeed > nWish) /* normalize the arguments */
         nWish = nNeed;
-#if KMP_OS_WINDOWS && !defined GUIDEDLL_EXPORTS
+#if KMP_OS_WINDOWS && !defined KMP_DYNAMIC_LIB
 /* only for Windows static library */
     /* reclaim array entries for root threads that are already dead */
     added = __kmp_reclaim_dead_roots();
@@ -5611,7 +5611,7 @@ __kmp_internal_end_dest( void *specific_
     __kmp_internal_end_thread( gtid );
 }
 
-#if KMP_OS_UNIX && GUIDEDLL_EXPORTS
+#if KMP_OS_UNIX && KMP_DYNAMIC_LIB
 
 // 2009-09-08 (lev): It looks the destructor does not work. In simple test cases destructors work
 // perfectly, but in real libiomp5.so I have no evidence it is ever called. However, -fini linker
@@ -6072,7 +6072,7 @@ __kmp_internal_end_thread( int gtid_req
             return;
         }
     }
-    #if defined GUIDEDLL_EXPORTS
+    #if defined 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
@@ -6519,7 +6519,7 @@ __kmp_do_serial_initialize( void )
         __kmp_register_atfork();
     #endif
 
-    #if ! defined GUIDEDLL_EXPORTS
+    #if ! defined 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.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_version.c?rev=238221&r1=238220&r2=238221&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_version.c (original)
+++ openmp/trunk/runtime/src/kmp_version.c Tue May 26 12:32:53 2015
@@ -69,7 +69,7 @@
 #endif // KMP_LIB_TYPE
 
 // Detect link type (static, dynamic).
-#ifdef GUIDEDLL_EXPORTS
+#ifdef KMP_DYNAMIC_LIB
     #define KMP_LINK_TYPE "dynamic"
 #else
     #define KMP_LINK_TYPE "static"

Modified: openmp/trunk/runtime/src/makefile.mk
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/makefile.mk?rev=238221&r1=238220&r2=238221&view=diff
==============================================================================
--- openmp/trunk/runtime/src/makefile.mk (original)
+++ openmp/trunk/runtime/src/makefile.mk Tue May 26 12:32:53 2015
@@ -513,7 +513,7 @@ ifeq "$(os)" "win"
     cpp-flags += -D KMP_WIN_CDECL
 endif
 ifeq "$(LINK_TYPE)" "dyna"
-    cpp-flags += -D GUIDEDLL_EXPORTS
+    cpp-flags += -D KMP_DYNAMIC_LIB
 endif
 ifeq "$(LIB_TYPE)" "stub"
     cpp-flags += -D KMP_STUB

Modified: openmp/trunk/runtime/src/z_Windows_NT_util.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Windows_NT_util.c?rev=238221&r1=238220&r2=238221&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Windows_NT_util.c (original)
+++ openmp/trunk/runtime/src/z_Windows_NT_util.c Tue May 26 12:32:53 2015
@@ -835,7 +835,7 @@ __kmp_runtime_initialize( void )
         return;
     };
 
-#if GUIDEDLL_EXPORTS
+#if KMP_DYNAMIC_LIB
     /* Pin dynamic library for the lifetime of application */
     {
         // First, turn off error message boxes
@@ -863,7 +863,7 @@ __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 GUIDEDLL_EXPORTS
+    #if KMP_OS_WINDOWS && ! defined KMP_DYNAMIC_LIB
         // Windows* OS, static library.
         /*
             New thread may use stack space previously used by another thread, currently terminated.





More information about the Openmp-commits mailing list