Messages in this thread | | | From | Nhat Pham <> | Subject | Re: [PATCH] locking/atomic: scripts: clarify ordering of conditional atomics | Date | Tue, 6 Feb 2024 10:40:05 -0800 |
| |
Let me bring in some beginners' perspective :)
For the most part, LGTM! My only comment is regarding the conditional atomics with relaxed ordering on success:
/** * If (@v == @old), atomically updates @v to @new with relaxed ordering. + * Otherwise, @v is not modified and no ordering is provided.
This is technically correct, but it can be confusing. It reads as if "relaxed ordering" is much different from no ordering, since we are juxtaposing them when we compare what happens when the condition holds v.s when it does not.
This can be potentially confusing to unfamiliar users. I consulted with Paul about this, and he suggested this rewording, which I like better:
"Otherwise, @v is not modified and relaxed ordering is provided."
With something along that line in place: Reviewed-by: Nhat Pham <nphamcs@gmail.com>
| |