[Openmp-commits] [PATCH] D138049: [OpenMP][libomp] Cleanup version script and exported symbols

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 6 06:34:18 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfef73b81e9a7: [OpenMP][libomp] Cleanup version script and exported symbols (authored by jlpeyton).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138049/new/

https://reviews.llvm.org/D138049

Files:
  openmp/runtime/src/exports_so.txt
  openmp/runtime/src/kmp_runtime.cpp
  openmp/runtime/src/z_Linux_util.cpp


Index: openmp/runtime/src/z_Linux_util.cpp
===================================================================
--- openmp/runtime/src/z_Linux_util.cpp
+++ openmp/runtime/src/z_Linux_util.cpp
@@ -979,7 +979,7 @@
 #if KMP_USE_MONITOR
 void __kmp_resume_monitor();
 
-void __kmp_reap_monitor(kmp_info_t *th) {
+extern "C" void __kmp_reap_monitor(kmp_info_t *th) {
   int status;
   void *exit_val;
 
@@ -1021,6 +1021,12 @@
 
   KMP_MB(); /* Flush all pending memory write invalidates.  */
 }
+#else
+// Empty symbol to export (see exports_so.txt) when
+// monitor thread feature is disabled
+extern "C" void __kmp_reap_monitor(kmp_info_t *th) {
+  (void)th;
+}
 #endif // KMP_USE_MONITOR
 
 void __kmp_reap_worker(kmp_info_t *th) {
Index: openmp/runtime/src/kmp_runtime.cpp
===================================================================
--- openmp/runtime/src/kmp_runtime.cpp
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -9195,3 +9195,20 @@
   if (__kmp_nesting_mode == 1) // turn on nesting for this case only
     set__max_active_levels(thread, __kmp_nesting_mode_nlevels);
 }
+
+// Empty symbols to export (see exports_so.txt) when feature is disabled
+extern "C" {
+#if !KMP_STATS_ENABLED
+void __kmp_reset_stats() {}
+#endif
+#if !USE_DEBUGGER
+int __kmp_omp_debug_struct_info = FALSE;
+int __kmp_debugging = FALSE;
+#endif
+#if !USE_ITT_BUILD || !USE_ITT_NOTIFY
+void __kmp_itt_fini_ittlib() {}
+void __kmp_itt_init_ittlib() {}
+#endif
+}
+
+// end of file
Index: openmp/runtime/src/exports_so.txt
===================================================================
--- openmp/runtime/src/exports_so.txt
+++ openmp/runtime/src/exports_so.txt
@@ -72,10 +72,8 @@
         __kmp_fork_call;
         __kmp_invoke_microtask;
 #if KMP_USE_MONITOR
-        __kmp_launch_monitor;
         __kmp_reap_monitor;
 #endif
-        __kmp_launch_worker;
         __kmp_reap_worker;
         __kmp_release_64;
         __kmp_wait_64;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138049.480468.patch
Type: text/x-patch
Size: 1923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221206/340dcbbc/attachment.bin>


More information about the Openmp-commits mailing list