Skip to content

Commit

Permalink
Minor cleanup in __kmp_atfork_child()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jpeyton52 committed Mar 30, 2018
1 parent 526fbf8 commit 1e6bb8d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion openmp/runtime/src/z_Linux_util.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 1e6bb8d

Please sign in to comment.