From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751427AbdE3VmY (ORCPT ); Tue, 30 May 2017 17:42:24 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:55798 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbdE3VmR (ORCPT ); Tue, 30 May 2017 17:42:17 -0400 Message-Id: <20170530211657.278022962@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 30 May 2017 23:15:52 +0200 From: Thomas Gleixner To: LKML Cc: John Stultz , Peter Zijlstra , Ingo Molnar Subject: [patch 19/26] posix-timers: Add cancel/arm callbacks References: <20170530211533.216608851@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=posix-timers--Add-cancel-arm-callbacks.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/posix-timers.h | 3 +++ 1 file changed, 3 insertions(+) Index: b/include/linux/posix-timers.h =================================================================== --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -126,6 +126,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); }; void run_posix_cpu_timers(struct task_struct *task);