From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 14 May 2014 17:26:36 -0400 To: 9fans@9fans.net Message-ID: <69df9a1401f0f33ca80a73b221d7758d@ladd.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] ainc() 386/amd64 differences Topicbox-Message-UUID: e66645c8-ead8-11e9-9d60-3106f5b1d025 > int > incref(Ref *r) > { > int x; > > x = ainc(&r->ref); > if(x <= 0) > panic("incref pc=%#p", getcallerpc(&r)); > return x; > } ah, yes. i'd not remembered this nice implementation. then your ainc is guard-free? and your Ref is struct Ref {int ref;}? also, did you decide that any reuse of the ref lock is already buggy and needs no further review? that's the bit i got bogged down on. - erik