> 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