On 11/20/24 9:36 AM, Uros Bizjak wrote:
On Wed, Nov 20, 2024 at 4:34 PM Alex Elder <elder@xxxxxxxxxxxx> wrote:
On 11/20/24 9:06 AM, Uros Bizjak wrote:
try_cmpxchg() loop with constant "new" value can be substituted
with just xchg() to atomically get and clear the location.
You're right. With a constant new value (0), there is no need
to loop to ensure we get a "stable" update.
Is the READ_ONCE() is still needed?
No, xchg() guarantees atomic access on its own.
Uros.
Based on that:
Reviewed-by: Alex Elder <elder@xxxxxxxxxxxx>