Page MenuHomePhabricator

kmp_lock: Change return type of release functions from void to int
ClosedPublic

Authored by Hahnfeld on Apr 9 2015, 6:19 AM.

Details

Reviewers
Hahnfeld
Summary

This is needed for OMPT to retrieve the actual release status of nested locks.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld updated this revision to Diff 23481.Apr 9 2015, 6:19 AM
Hahnfeld retitled this revision from to kmp_lock: Change return type of release functions from void to int.
Hahnfeld updated this object.
Hahnfeld edited the test plan for this revision. (Show Details)
Hahnfeld added a subscriber: Unknown Object (MLST).
jcownie added a subscriber: jcownie.EditedApr 9 2015, 6:46 AM

I think it would be cleaner if you defined the new constants as KMP_LOCK_RELEASED and KMP_LOCK_STILL_HELD, then the non-nested lock implementations can sensibly return KMP_LOCK_RELEASED, which would be preferable to the explicit "0" they return at the moment.

I think it would be cleaner if you defined the new constants as KMP_LOCK_RELEASED and KMP_LOCK_STILL_HELD, then the non-nested lock implementations can sensibly return KMP_LOCK_RELEASED, which would be preferable to the explicit "0" they return at the moment.

Good idea, have changed it locally and will be included in an updated revision (next week?)

Hahnfeld updated this revision to Diff 24291.Apr 23 2015, 5:41 AM
Hahnfeld set the repository for this revision to rL LLVM.
Hahnfeld removed rL LLVM as the repository for this revision.

LGTM. Please, commit.

Hahnfeld accepted this revision.May 6 2015, 11:16 PM
Hahnfeld added a reviewer: Hahnfeld.

Committed with revision 236114

This revision is now accepted and ready to land.May 6 2015, 11:16 PM
Hahnfeld closed this revision.May 6 2015, 11:16 PM