[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87plj7f7zp.ffs@tglx>
Date: Mon, 24 Feb 2025 20:38:50 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Anna-Maria Behnsen
<anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>,
Benjamin Segall <bsegall@...gle.com>, Eric Dumazet <edumazet@...gle.com>,
Andrey Vagin <avagin@...nvz.org>, Pavel Tikhomirov
<ptikhomirov@...tuozzo.com>
Subject: Re: [patch 06/11] posix-timers: Make
signal_struct::next_posix_timer_id an atomic_t
On Mon, Feb 24 2025 at 14:20, Peter Zijlstra wrote:
> On Mon, Feb 24, 2025 at 11:15:32AM +0100, Thomas Gleixner wrote:
>
>> + unsigned int id = (atomic_inc_return(&sig->next_posix_timer_id) - 1) & INT_MAX;
>
> How about:
>
> unsigned int id = atomic_fetch_inc(&sig->next_posix_timer_id) & INT_MAX;
Duh. Yes.
Powered by blists - more mailing lists