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

index | next in thread | previous in thread | raw e-mail

On Wed, Sep 22, 2004 at 07:58:43PM +0000, Marcel Moolenaar wrote:
> marcel      2004-09-22 19:58:43 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/ia64/include     atomic.h 
>   Log:
>   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.
>   
>   Revision  Changes    Path
>   1.8       +4 -2      src/sys/ia64/include/atomic.h

Indeed, this is useful.  There is precedent for this on sparc64.  That said,
I have to admit that the inconsistency left me scratching my head for a few
minutes when I first read the sparc64 pmap.

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.)

Regards,
Alan


home | help

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