Re: [PATCH] tools/memory-model: Document herd7 (internal) representation

From: Alan Stern
Date: Fri May 24 2024 - 11:53:22 EST


On Fri, May 24, 2024 at 05:13:56PM +0200, Andrea Parri wrote:
> tools/memory-model/ and herdtool7 are closely linked: the latter is
> responsible for (pre)processing each C-like macro of a litmus test,
> and for providing the LKMM with a set of events, or "representation",
> corresponding to the given macro. Provide herd-representation.txt
> to document the representation of synchronization macros, following
> their "classification" in Documentation/atomic_t.txt.
>
> Suggested-by: Hernan Ponce de Leon <hernan.poncedeleon@xxxxxxxxxxxxxxx>
> Signed-off-by: Andrea Parri <parri.andrea@xxxxxxxxx>
> ---

> + | rcu_dereference | R[once] |
> + | rcu_assign_pointer | W[release] |
> + | srcu_read_lock | R[srcu-lock] |
> + | srcu_read_unlock | W[srcu-unlock] |
> + | synchronize_srcu | SRCU[sync-srcu] |
> + ---------------------------------------------------------------------------
> + | RMW ops w/o return value | |
> + ---------------------------------------------------------------------------
> + | atomic_add | R*[noreturn] ->rmw W*[once] |

What's the difference between R and R*, or between W and W*?

Alan