[Openmp-commits] [PATCH] D44949: Minor cleanup in __kmp_atfork_child()

Hansang Bae via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Mar 27 12:41:33 PDT 2018


hbae created this revision.
hbae added reviewers: tlwilmar, jlpeyton, AndreyChurbanov.
hbae added a project: OpenMP.

This change removes the unnecessary lock operation on `__kmp_initz_lock` inside the `__kmp_atfork_child()` function for Linux; the lock variable is initialized in the same function later.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D44949

Files:
  runtime/src/z_Linux_util.cpp


Index: runtime/src/z_Linux_util.cpp
===================================================================
--- runtime/src/z_Linux_util.cpp
+++ runtime/src/z_Linux_util.cpp
@@ -1267,7 +1267,6 @@
    clean data structures in initial states.  Don't worry about freeing memory
    allocated by parent, just abandon it to be safe. */
 static void __kmp_atfork_child(void) {
-  __kmp_release_bootstrap_lock(&__kmp_initz_lock);
   __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock);
   /* TODO make sure this is done right for nested/sibling */
   // ATT:  Memory leaks are here? TODO: Check it and fix.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44949.139982.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180327/ab93ff27/attachment.bin>


More information about the Openmp-commits mailing list