Page MenuHomeFreeBSD

libthr: Fix try lock
ClosedPublic

Authored by aokblast on Wed, Oct 7, 2:33 AM.
Tags
None
Referenced Files
F175142968: D60427.id188995.diff
Thu, Oct 8, 3:04 PM
F175114597: D60427.id188994.diff
Thu, Oct 8, 8:58 AM
F175091717: D60427.diff
Thu, Oct 8, 5:08 AM
F175091468: D60427.id188994.diff
Thu, Oct 8, 5:06 AM
F175079313: D60427.id188920.diff
Thu, Oct 8, 2:46 AM
F175079296: D60427.id188995.diff
Thu, Oct 8, 2:46 AM
F175075669: D60427.diff
Thu, Oct 8, 2:04 AM
F175075653: D60427.id188920.diff
Thu, Oct 8, 2:04 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 Not Applicable
Unit
Tests Not Applicable

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.