[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-525b8ed91671e29e187dfe02d408b11190ccf494@git.kernel.org>
Date: Mon, 5 Jun 2017 01:22:20 -0700
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, peterz@...radead.org, tglx@...utronix.de,
mingo@...nel.org, linux-kernel@...r.kernel.org,
john.stultz@...aro.org
Subject: [tip:timers/core] posix-timers: Add cancel/arm callbacks
Commit-ID: 525b8ed91671e29e187dfe02d408b11190ccf494
Gitweb: http://git.kernel.org/tip/525b8ed91671e29e187dfe02d408b11190ccf494
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Tue, 30 May 2017 23:15:52 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sun, 4 Jun 2017 15:40:28 +0200
posix-timers: Add cancel/arm callbacks
Add timer_try_to_cancel() and timer_arm() callbacks to kclock which allow
to make common_timer_set() usable by both hrtimer and alarmtimer based
clocks.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: John Stultz <john.stultz@...aro.org>
Link: http://lkml.kernel.org/r/20170530211657.278022962@linutronix.de
---
kernel/time/posix-timers.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/time/posix-timers.h b/kernel/time/posix-timers.h
index 3bc5b74..b0ad77e 100644
--- a/kernel/time/posix-timers.h
+++ b/kernel/time/posix-timers.h
@@ -21,6 +21,9 @@ struct k_clock {
void (*timer_rearm)(struct k_itimer *timr);
int (*timer_forward)(struct k_itimer *timr, ktime_t now);
ktime_t (*timer_remaining)(struct k_itimer *timr, ktime_t now);
+ int (*timer_try_to_cancel)(struct k_itimer *timr);
+ void (*timer_arm)(struct k_itimer *timr, ktime_t expires,
+ bool absolute, bool sigev_none);
};
extern const struct k_clock clock_posix_cpu;
Powered by blists - more mailing lists