From owner-freebsd-current Sun Mar 23 17:12:11 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFF1F37B401 for ; Sun, 23 Mar 2003 17:12:10 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 051BB43F75 for ; Sun, 23 Mar 2003 17:12:10 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from itanium.pn.xcllnt.net (itanium.pn.xcllnt.net [192.168.4.5]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2O1C8Ku006300; Sun, 23 Mar 2003 17:12:08 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from itanium.pn.xcllnt.net (localhost [127.0.0.1]) by itanium.pn.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2O1C7Hb004053; Sun, 23 Mar 2003 17:12:07 -0800 (PST) (envelope-from marcel@itanium.pn.xcllnt.net) Received: (from marcel@localhost) by itanium.pn.xcllnt.net (8.12.8/8.12.8/Submit) id h2O1C7af004052; Sun, 23 Mar 2003 17:12:07 -0800 (PST) (envelope-from marcel) Date: Sun, 23 Mar 2003 17:12:07 -0800 From: Marcel Moolenaar To: Craig Rodrigues Cc: freebsd-current@FreeBSD.ORG Subject: Re: atomic_dec_and_test() in FreeBSD? Message-ID: <20030324011207.GA3985@itanium.pn.xcllnt.net> References: <20030323233717.GA76063@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030323233717.GA76063@attbi.com> User-Agent: Mutt/1.5.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Mar 23, 2003 at 06:37:17PM -0500, Craig Rodrigues wrote: > > APR makes use of a function in Linux called > atomic_dec_and_test which is described here: *snip* > Is there a way that I can use the existing > FreeBSD macros to achieve the equivalent of atomic_dec_and_test? Probably not a good idea. You're much better off implementing it on your own. Your requirements are likely to be different from those of the kernel. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message