Date: Tue, 21 May 2002 13:43:18 -0700 From: Alfred Perlstein <bright@mu.org> To: Archie Cobbs <archie@dellroad.org> Cc: freebsd-arch@freebsd.org Subject: Re: question about atomic.h Message-ID: <20020521204318.GJ54960@elvis.mu.org> In-Reply-To: <200205212027.g4LKRD058396@arch20m.dellroad.org> References: <200205212027.g4LKRD058396@arch20m.dellroad.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Archie Cobbs <archie@dellroad.org> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020521204318.GJ54960>