Page MenuHomeFreeBSD

Fix cv_waiters wraparound bug
ClosedPublic

Authored by markj on Jan 8 2016, 12:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 3:57 PM
Unknown Object (File)
Sun, Nov 3, 3:56 PM
Unknown Object (File)
Sun, Nov 3, 3:56 PM
Unknown Object (File)
Sun, Nov 3, 3:56 PM
Unknown Object (File)
Sun, Nov 3, 3:34 PM
Unknown Object (File)
Sat, Nov 2, 12:12 PM
Unknown Object (File)
Thu, Oct 31, 10:08 AM
Unknown Object (File)
Sep 28 2024, 6:41 AM
Subscribers

Details

Summary

This is another attempt to fix the issue described in r282971, which was
reverted in r283250. Rather than eliminating cv_waiters entirely, cap
its value at INT_MAX and modify cv_signal() to handle that case
appropriately. In particular, this lets us avoid looking up the
sleepqueue on every call to cv_signal().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1991
Build 1999: arc lint + arc unit

Event Timeline

markj retitled this revision from to Fix cv_waiters wraparound bug.
markj edited the test plan for this revision. (Show Details)
markj updated this object.

Don't assert cv_waiters == 0 in cv_destroy().

It may be non-zero even with zero sleepers, since threads don't
decrement it when they wake up.

jhb edited edge metadata.
This revision is now accepted and ready to land.Jan 8 2016, 6:56 PM
This revision was automatically updated to reflect the committed changes.