From owner-freebsd-arch Tue May 21 13:43:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id ECF2B37B404 for ; Tue, 21 May 2002 13:43:18 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id C55ACAE25A; Tue, 21 May 2002 13:43:18 -0700 (PDT) Date: Tue, 21 May 2002 13:43:18 -0700 From: Alfred Perlstein To: Archie Cobbs Cc: freebsd-arch@freebsd.org Subject: Re: question about atomic.h Message-ID: <20020521204318.GJ54960@elvis.mu.org> References: <200205212027.g4LKRD058396@arch20m.dellroad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205212027.g4LKRD058396@arch20m.dellroad.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Archie Cobbs [020521 13:30] wrote: > > With atomic_subtract_int() returning void, there's no way to do > that without acquiring the mutex, because you can't atomically > decrement *and* read the reference count. Check the mbuf subsystem for the way they do the atomic "decerement and let me know if it went to zero" operation. it's something like atomic_int_acq or something. :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message