summaryrefslogtreecommitdiff
path: root/include/linux/posix-timers.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-11-05 09:14:33 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-11-07 02:14:43 +0100
commitbf635681c906ad056d1fda325de8d1c12c9f8201 (patch)
tree5186970b315513cf7bc6ab81efcdfe53b9f93408 /include/linux/posix-timers.h
parentb06b0345fff3678517acd0f1837d52477ba30944 (diff)
posix-cpu-timers: Cleanup the firing logic
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@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/all/20241105064213.172848618@linutronix.de
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r--include/linux/posix-timers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 8c6d97412526..b1de21731a08 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -49,7 +49,7 @@ struct cpu_timer {
struct timerqueue_head *head;
struct pid *pid;
struct list_head elist;
- int firing;
+ bool firing;
struct task_struct __rcu *handling;
};