Re: [PATCH] tools/memory-model: Add atomic_andnot() with its variants
From: Paul E. McKenney
Date: Tue May 14 2024 - 15:02:53 EST
On Tue, May 14, 2024 at 01:11:22PM +0200, Andrea Parri wrote:
> > 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>
Queued and pushed, thank you both!
Again, I will hold off pushing this until herd7 releases a version
supporting this.
Thanx, Paul