[Mesa-dev] [PATCH] util/u_atomic: Add new macro p_atomic_add

Matt Turner mattst88 at gmail.com
Fri Feb 6 12:21:06 PST 2015


On Fri, Feb 6, 2015 at 11:43 AM, Carl Worth <cworth at cworth.org> wrote:
> This provides for atomic addition, which will be used by an upcoming
> shader-cache patch. A simple test is added to "make check" as well.
>
> Note: The various O/S functions differ on whether they return the
> original value or the value after the addition, so I did not provide
> an add_return() macro which would be sensitive to that difference.
>
> ---
>
> Note: I referenced the MSDN web pages and some online Solaris man
> pages to update the relevant sections, (but I have neither compiled
> nor tested this new macro on those operating systems). I would
> appreciate any relvant review or reports from testing.

The gcc bits are

Reviewed-by: Matt Turner <mattst88 at gmail.com>

and I don't see anything wrong with the MSVC/Solaris bits, FWIW.

Thanks for extending the test case as well.


More information about the mesa-dev mailing list