Date: Fri, 4 Apr 2003 20:54:05 +0100 From: Christoph Hellwig <hch@infradead.org> To: Garrett Rooney <rooneg@electricjellyfish.net> Cc: John Baldwin <jhb@FreeBSD.org> Subject: Re: atomic_dec_and_test() in FreeBSD? Message-ID: <20030404205405.A29698@infradead.org> In-Reply-To: <3E8DE275.6040000@electricjellyfish.net>; from rooneg@electricjellyfish.net on Fri, Apr 04, 2003 at 02:52:21PM -0500 References: <XFMail.20030404144550.jhb@FreeBSD.org> <3E8DE275.6040000@electricjellyfish.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 04, 2003 at 02:52:21PM -0500, Garrett Rooney wrote: > yeah, the default implementation of this function in APR uses mutexes to > ensure that the increment is atomic, but craig is looking for a way to > implement the 'platform specific faster way to do it without a mutex'. > worst case, we can just use the default impl on freebsd 4.x and use > atomic_cmpset_int on 5.x. Just FYI, the i386 atomic.h from Linux doesn't rely on any kernel features so you could in theory just copy it over. But I guess the licensing stand against this.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030404205405.A29698>