Page MenuHomeFreeBSD

Use REFCOUNT_COUNT() to obtain refcount where appropriate
ClosedPublic

Authored by hselasky on Sep 12 2019, 3:46 PM.
Tags
None
Referenced Files
F138219756: D21620.id.diff
Sun, Nov 30, 12:37 AM
F138186969: D21620.id54425.diff
Sat, Nov 29, 5:15 PM
Unknown Object (File)
Thu, Nov 20, 4:33 PM
Unknown Object (File)
Thu, Nov 20, 4:32 PM
Unknown Object (File)
Thu, Nov 20, 4:31 PM
Unknown Object (File)
Thu, Nov 20, 4:29 PM
Unknown Object (File)
Thu, Nov 20, 4:15 PM
Unknown Object (File)
Wed, Nov 19, 4:42 PM
Subscribers

Details

Summary

Refcount waiting will set some flag bits in the refcount value. Make sure these bits get cleared by using the REFCOUNT_COUNT() macro to obtain the actual refcount.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib added inline comments.
sys/vm/vm_object.c
398 ↗(On Diff #61982)

Fix the style, ... > 0. There and several places below as well.

This revision is now accepted and ready to land.Sep 12 2019, 3:48 PM
hselasky marked an inline comment as done.

Fix style.

This revision now requires review to proceed.Sep 12 2019, 4:06 PM

Does this fix an observed bug? The waiter bit should only be set if the counter value is non-zero, so the comparisons with 0 should work correctly regardless. I agree with the change though.

This revision is now accepted and ready to land.Sep 12 2019, 4:08 PM