[Openmp-commits] [openmp] r328900 - Minor cleanup in __kmp_atfork_child()

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 30 12:55:11 PDT 2018

Author: jlpeyton
Date: Fri Mar 30 12:55:11 2018
New Revision: 328900

URL: http://llvm.org/viewvc/llvm-project?rev=328900&view=rev
Minor cleanup in __kmp_atfork_child()

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.

Patch by Hansang Bae

Differential Revision: https://reviews.llvm.org/D44949


Modified: openmp/trunk/runtime/src/z_Linux_util.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Linux_util.cpp?rev=328900&r1=328899&r2=328900&view=diff
--- openmp/trunk/runtime/src/z_Linux_util.cpp (original)
+++ openmp/trunk/runtime/src/z_Linux_util.cpp Fri Mar 30 12:55:11 2018
@@ -1267,7 +1267,6 @@ static void __kmp_atfork_parent(void) {
    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);
   /* TODO make sure this is done right for nested/sibling */
   // ATT:  Memory leaks are here? TODO: Check it and fix.

More information about the Openmp-commits mailing list