atomic v_usecount and v_holdcnt
    Edward Tomasz Napierała 
    trasz at FreeBSD.org
       
    Thu Jun 25 19:53:57 UTC 2015
    
    
  
On 0626T0429, Bruce Evans wrote:
> 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.
How about refcount_acquire_gt_0() and refcount_release_gt_1()1?
    
    
More information about the freebsd-fs
mailing list