cvs commit: src/sys/ia64/include atomic.h

Marcel Moolenaar marcel at xcllnt.net
Wed Sep 22 13:44:58 PDT 2004


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 at xcllnt.net


More information about the cvs-src mailing list