Re: [patch V2 10/17] posix-timers: Make signal_struct::next_posix_timer_id an atomic_t
From: Thomas Gleixner
Date: Mon Mar 03 2025 - 16:24:54 EST
On Mon, Mar 03 2025 at 23:21, Cyrill Gorcunov wrote:
> On Sun, Mar 02, 2025 at 08:36:59PM +0100, Thomas Gleixner wrote:
>> static int posix_timer_add(struct k_itimer *timer)
>> {
> ...
>> + for (unsigned int cnt = 0; cnt <= INT_MAX; cnt++) {
>
> Hi, Thomas! This moment slightly confusing -- are we allowed to declare
> type inside 'for' statement? (c99 allows, just never seen it before inside
> the kernel code).
We're slowly moving towards scope based variables. It's not widely used
yet, but it's coming along.
> Not a big deal though, thanks a huge for fixing this problem with
> timers and criu.
Welcome. Some quick validation with CRIU would be appreciated.
Thanks,
tglx