[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250224132047.GA34233@noisy.programming.kicks-ass.net>
Date: Mon, 24 Feb 2025 14:20:47 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
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 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;
Powered by blists - more mailing lists