diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2020-11-13 13:13:33 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-01-06 16:24:59 -0800 |
commit | dcd42591ebb8a25895b551a5297ea9c24414ba54 (patch) | |
tree | eec399bc78a189494237e0e3842098b2b8591e9b /include/linux/timer.h | |
parent | 43759fe5a137389e94ed6d4680c3c63c17273158 (diff) | |
download | lwn-dcd42591ebb8a25895b551a5297ea9c24414ba54.tar.gz lwn-dcd42591ebb8a25895b551a5297ea9c24414ba54.zip |
timer: Add timer_curr_running()
This commit adds a timer_curr_running() function that verifies that the
current code is running in the context of the specified timer's handler.
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r-- | include/linux/timer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index fda13c9d1256..4118a97e62fb 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -192,6 +192,8 @@ extern int try_to_del_timer_sync(struct timer_list *timer); #define del_singleshot_timer_sync(t) del_timer_sync(t) +extern bool timer_curr_running(struct timer_list *timer); + extern void init_timers(void); struct hrtimer; extern enum hrtimer_restart it_real_fn(struct hrtimer *); |