From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751658AbdFEI2k (ORCPT ); Mon, 5 Jun 2017 04:28:40 -0400 Received: from terminus.zytor.com ([65.50.211.136]:48025 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbdFEI2j (ORCPT ); Mon, 5 Jun 2017 04:28:39 -0400 Date: Mon, 5 Jun 2017 01:25:08 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: john.stultz@linaro.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org Reply-To: john.stultz@linaro.org, hpa@zytor.com, peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de In-Reply-To: <20170530211657.670026824@linutronix.de> References: <20170530211657.670026824@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] alarmtimer: Implement try_to_cancel callback Git-Commit-ID: e344c9e76bc6af997926171bfd90d25bbae0a2c5 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e344c9e76bc6af997926171bfd90d25bbae0a2c5 Gitweb: http://git.kernel.org/tip/e344c9e76bc6af997926171bfd90d25bbae0a2c5 Author: Thomas Gleixner AuthorDate: Tue, 30 May 2017 23:15:57 +0200 Committer: Thomas Gleixner CommitDate: Sun, 4 Jun 2017 15:40:31 +0200 alarmtimer: Implement try_to_cancel callback Preparatory change to utilize the common posix timer mechanisms. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.670026824@linutronix.de --- kernel/time/alarmtimer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 02ddc40..374bd85 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -573,6 +573,15 @@ static ktime_t alarm_timer_remaining(struct k_itimer *timr, ktime_t now) } /** + * alarm_timer_try_to_cancel - Posix timer callback to cancel a timer + * @timr: Pointer to the posixtimer data struct + */ +static int alarm_timer_try_to_cancel(struct k_itimer *timr) +{ + return alarm_try_to_cancel(&timr->it.alarm.alarmtimer); +} + +/** * alarm_clock_getres - posix getres interface * @which_clock: clockid * @tp: timespec to fill @@ -902,6 +911,7 @@ const struct k_clock alarm_clock = { .timer_rearm = alarm_timer_rearm, .timer_forward = alarm_timer_forward, .timer_remaining = alarm_timer_remaining, + .timer_try_to_cancel = alarm_timer_try_to_cancel, .nsleep = alarm_timer_nsleep, }; #endif /* CONFIG_POSIX_TIMERS */