Re: [PATCH] tools/memory-model: Add atomic_andnot() with its variants

From: Andrea Parri
Date: Tue May 14 2024 - 07:32:41 EST


> C andnot
>
> {
> atomic_t u = ATOMIC_INIT(7);
> }
>
> P0(atomic_t *u)
> {
>
> r0 = atomic_fetch_andnot(3, u);
> r1 = READ_ONCE(*u);
> }
>
> exists (0:r0=7 /\ 0:r1=4)

Fair enough for the changelog. If/when submitting proper tests, please
check their format using klitmus7 (besides herd7); say,

$ mkdir mymodule
$ klitmus7 -o mymodule <.litmus file>
$ cd mymodule ; make
$ sudo sh run.sh

Documentation/litmus-tests/ provides some examples litmus tests.


> Signed-off-by: Puranjay Mohan <puranjay@xxxxxxxxxx>

Acked-by: Andrea Parri <parri.andrea@xxxxxxxxx>

Andrea