Re: [patch v6 03/20] posix-cpu-timers: Cleanup the firing logic
From: Frederic Weisbecker
Date: Fri Nov 01 2024 - 09:14:43 EST
Le Thu, Oct 31, 2024 at 04:46:26PM +0100, Thomas Gleixner a écrit :
> The firing flag of a posix CPU timer is tristate:
>
> 0: when the timer is not about to deliver a signal
>
> 1: when the timer has expired, but the signal has not been delivered yet
>
> -1: when the timer was queued for signal delivery and a rearm operation
> raced against it and supressed the signal delivery.
>
> This is a pointless exercise as this can be simply expressed with a
> boolean. Only if set, the signal is delivered. This makes delete and rearm
> consistent with the rest of the posix timers.
>
> Convert firing to bool and fixup the usage sites accordingly and add
> comments why the timer cannot be dequeued right away.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>