posix-timers: Add active flag to k_itimer

Keep track of the activation state of posix timers. This is a preparatory
change for making common_timer_get() usable by both hrtimer and alarm timer
implementations.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20170530211656.967783982@linutronix.de
This commit is contained in:
Thomas Gleixner 2017-05-30 23:15:48 +02:00
parent f37fb0aa4f
commit 21e55c1f83
2 changed files with 9 additions and 1 deletions

View file

@ -59,6 +59,7 @@ struct cpu_timer_list {
* @kclock: Pointer to the k_clock struct handling this timer
* @it_clock: The posix timer clock id
* @it_id: The posix timer id for identifying the timer
* @it_active: Marker that timer is active
* @it_overrun: The overrun counter for pending signals
* @it_overrun_last: The overrun at the time of the last delivered signal
* @it_requeue_pending: Indicator that timer waits for being requeued on
@ -79,6 +80,7 @@ struct k_itimer {
const struct k_clock *kclock;
clockid_t it_clock;
timer_t it_id;
int it_active;
int it_overrun;
int it_overrun_last;
int it_requeue_pending;