Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2015 21:53:52 +0200
From:      Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Mateusz Guzik <mjguzik@gmail.com>, freebsd-fs@freebsd.org
Subject:   Re: atomic v_usecount and v_holdcnt
Message-ID:  <20150625195352.GB1042@brick.home>
In-Reply-To: <20150626042546.Q2820@besplex.bde.org>
References:  <20141122002812.GA32289@dft-labs.eu> <20141122092527.GT17068@kib.kiev.ua> <20141122211147.GA23623@dft-labs.eu> <20141124095251.GH17068@kib.kiev.ua> <20150314225226.GA15302@dft-labs.eu> <20150316094643.GZ2379@kib.kiev.ua> <20150317014412.GA10819@dft-labs.eu> <20150318104442.GS2379@kib.kiev.ua> <20150625123156.GA29667@dft-labs.eu> <20150626042546.Q2820@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150625195352.GB1042>