atomic v_usecount and v_holdcnt

Bruce Evans brde at optusnet.com.au
Thu Jun 25 18:29:11 UTC 2015


On Thu, 25 Jun 2015, Mateusz Guzik wrote:

> On Wed, Mar 18, 2015 at 12:44:42PM +0200, Konstantin Belousov wrote:
>> On Tue, Mar 17, 2015 at 02:44:12AM +0100, Mateusz Guzik wrote:

>>> I replaced them with refcount_acquire_if_not_zero and
>>> refcount_release_if_not_last.
>> I dislike the length of the names.  Can you propose something shorter ?
>
> Unfortunately the original API is alreday quite verbose and I don't have
> anything readable which would retain "refcount_acquire" (instead of a
> "ref_get" or "ref_acq"). Adding "_nz" as a suffix does not look good
> ("refcount_acquire_if_nz").

refcount -> rc
acquire -> acq

The "acq" abbreviation is already used a lot for atomic ops.

Bruce


More information about the freebsd-fs mailing list