Page MenuHomeFreeBSD

libthr: Fix try lock
ClosedPublic

Authored by aokblast on Wed, Oct 7, 2:33 AM.
Tags
None
Referenced Files
F175641120: D60427.id188995.diff
Mon, Oct 12, 5:50 AM
F175524818: D60427.id.diff
Sun, Oct 11, 11:16 AM
F175524549: D60427.id188920.diff
Sun, Oct 11, 11:13 AM
F175521964: D60427.id188994.diff
Sun, Oct 11, 10:40 AM
F175516508: D60427.id188995.diff
Sun, Oct 11, 9:34 AM
F175506236: D60427.id188995.diff
Sun, Oct 11, 7:57 AM
Unknown Object (File)
Sun, Oct 11, 4:17 AM
Unknown Object (File)
Sun, Oct 11, 3:29 AM
Subscribers

Details

Summary
  1. When contester > 2, a release causes kernel set CONTENTION bit but with no owner. In this case, the userspace should be able to try the lock instead of fall immediately. We copy this from trylock2.
  2. A PI mutex should consult to kernel instead of decided by userspace itself.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 77817
Build 74700: arc lint + arc unit

Event Timeline

Besides the formatting bug, I think that the algorithmic change is fine.

lib/libthr/thread/thr_umtx.h
87

Fix indent, all continuation lines for the same statement must use the same indent. Also fill the previous line more.

This revision is now accepted and ready to land.Wed, Oct 7, 5:12 PM
This revision was automatically updated to reflect the committed changes.