From owner-cvs-src@FreeBSD.ORG Wed Sep 22 20:44:58 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D721516A4EB; Wed, 22 Sep 2004 20:44:57 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 408E243D41; Wed, 22 Sep 2004 20:44:57 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from alpha.pn.xcllnt.net (alpha.pn.xcllnt.net [192.168.4.4]) by ns1.xcllnt.net (8.13.1/8.13.1) with ESMTP id i8MKitRl086979; Wed, 22 Sep 2004 13:44:55 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from alpha.pn.xcllnt.net (localhost [127.0.0.1]) by alpha.pn.xcllnt.net (8.13.1/8.13.1) with ESMTP id i8MKit6D076821; Wed, 22 Sep 2004 13:44:55 -0700 (PDT) (envelope-from marcel@alpha.pn.xcllnt.net) Received: (from marcel@localhost) by alpha.pn.xcllnt.net (8.13.1/8.13.1/Submit) id i8MKisEO076820; Wed, 22 Sep 2004 13:44:54 -0700 (PDT) (envelope-from marcel) Date: Wed, 22 Sep 2004 13:44:54 -0700 From: Marcel Moolenaar To: Alan Cox Message-ID: <20040922204454.GA60053@alpha.pn.xcllnt.net> References: <200409221958.i8MJwhEL060898@repoman.freebsd.org> <20040922202210.GE16687@cs.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040922202210.GE16687@cs.rice.edu> User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ia64/include atomic.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 20:44:58 -0000 On Wed, Sep 22, 2004 at 03:22:10PM -0500, Alan Cox wrote: > > For the atomic_{add|clear|set|subtract} family of inlines, return the > > old or previous value instead of void. This is not as is documented > > in atomic(9), but is API (and ABI) compatible and simply makes sense. > > This feature will primarily be used for atomic PTE updates in PMAP/ng. > > It might be wise to come up with a different set of names for this variant. > On ia64 and sparc64, they could have the same implementation. (Whereas, > amd64 and i386 would probably have different implementations.) Yes, it's probably a good idea to extend the set of atomic operations. That way we have better consistency across platforms. For now (I didn't want to embark on yet another cross-platform overhaul as the result of wanting to improve ia64) I'm happy with it being an undocumented feature on ia64 (ala sparc64). In my WIP, I introduced pte_atomic_set() and pte_atomic_clear() to avoid using the atomic functions directly, so if we later grow new functions, it's easy for me to switch to them. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net