This is an archive of the discontinued LLVM Phabricator instance.

Fixes to wait-loop code
ClosedPublic

Authored by jlpeyton on Nov 6 2015, 11:34 AM.

Details

Summary
  1. Add get_ptr_type() method to all wait flag types.
  2. Flag in sleep_loc may change type by the time the resume is called from __kmp_null_resume_wrapper. We use get_ptr_type to obtain the real type and compare it to the casted object received. If they don't match, we know the flag has changed (already resumed and replaced by another flag). If they match, it doesn't hurt to go ahead and resume it.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton updated this revision to Diff 39569.Nov 6 2015, 11:34 AM
jlpeyton retitled this revision from to Fixes to wait-loop code.
jlpeyton updated this object.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
tlwilmar accepted this revision.Nov 6 2015, 12:43 PM
tlwilmar edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 6 2015, 12:43 PM
This revision was automatically updated to reflect the committed changes.