From 1e6bb8d5de52252e12f41955e6c608d23193917e Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Fri, 30 Mar 2018 19:55:11 +0000 Subject: [PATCH] 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 llvm-svn: 328900 --- openmp/runtime/src/z_Linux_util.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp index f50dac06d1941..c087dcc0638de 100644 --- a/openmp/runtime/src/z_Linux_util.cpp +++ b/openmp/runtime/src/z_Linux_util.cpp @@ -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); __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.