[Openmp-commits] [PATCH] D28377: Fix a race in shutdown when tasking is used
Terry Wilmarth via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 5 13:22:17 PST 2017
tlwilmar created this revision.
tlwilmar added reviewers: Hahnfeld, AndreyChurbanov, hbae.
tlwilmar added a subscriber: openmp-commits.
tlwilmar set the repository for this revision to rL LLVM.
Jonas Hahnfeld reported a bug in shutdown in the presence of tasking.
This change fixes a race in shutdown code when threads are being reaped. Threads spinning in fork barrier and searching for tasks to steal may identify other threads as potential victims to steal from. The other threads may have already been reaped.
The fix creates a simple flag on the threads that lets them indicate that they are in a reapable state when shutdown is happening. The shutdown code then forces any threads out of the fork barrier and then waits until all the threads are reapable, before reaping any of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4778 bytes
Desc: not available
More information about the Openmp-commits