Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2004 13:44:54 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/ia64/include atomic.h
Message-ID:  <20040922204454.GA60053@alpha.pn.xcllnt.net>
In-Reply-To: <20040922202210.GE16687@cs.rice.edu>
References:  <200409221958.i8MJwhEL060898@repoman.freebsd.org> <20040922202210.GE16687@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040922204454.GA60053>