[Openmp-commits] [PATCH] D41462: Improve stability of the runtime in parent/child processes

Hansang Bae via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 20 13:15:01 PST 2017


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

This change improves stability of the runtime when the application forks child processes.
Acquiring/releasing __kmp_initz_lock and __kmp_forkjoin_lock in the atfork handlers insures that the actual fork does not occur while those two locks are held, and __kmp_itt_reset() reverts the itt's global state to the initial state which also initializes the mutex stored in the global state.
Some missing initialization code was also inserted in the child's atfork handler.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D41462

Files:
  runtime/src/kmp.h
  runtime/src/kmp_itt.cpp
  runtime/src/kmp_itt.h
  runtime/src/kmp_runtime.cpp
  runtime/src/kmp_tasking.cpp
  runtime/src/z_Linux_util.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41462.127777.patch
Type: text/x-patch
Size: 5263 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171220/86a92bd0/attachment.bin>


More information about the Openmp-commits mailing list