From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751740AbdFEIYQ (ORCPT ); Mon, 5 Jun 2017 04:24:16 -0400 Received: from terminus.zytor.com ([65.50.211.136]:40907 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751474AbdFEIYO (ORCPT ); Mon, 5 Jun 2017 04:24:14 -0400 Date: Mon, 5 Jun 2017 01:20:38 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, peterz@infradead.org, john.stultz@linaro.org, mingo@kernel.org Reply-To: peterz@infradead.org, mingo@kernel.org, john.stultz@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <20170530211657.044915536@linutronix.de> References: <20170530211657.044915536@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] posix-timers: Add forward/remaining callbacks Git-Commit-ID: 63841b2a6969501de183efafc14d20175e402804 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: 63841b2a6969501de183efafc14d20175e402804 Gitweb: http://git.kernel.org/tip/63841b2a6969501de183efafc14d20175e402804 Author: Thomas Gleixner AuthorDate: Tue, 30 May 2017 23:15:49 +0200 Committer: Thomas Gleixner CommitDate: Sun, 4 Jun 2017 15:40:27 +0200 posix-timers: Add forward/remaining callbacks Add two callbacks to kclock which allow using common_)timer_get() for both hrtimer and alarm timer based clocks. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211657.044915536@linutronix.de --- kernel/time/posix-timers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/posix-timers.h b/kernel/time/posix-timers.h index 1f6f6f9..3bc5b74 100644 --- a/kernel/time/posix-timers.h +++ b/kernel/time/posix-timers.h @@ -19,6 +19,8 @@ struct k_clock { void (*timer_get)(struct k_itimer *timr, struct itimerspec64 *cur_setting); 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); }; extern const struct k_clock clock_posix_cpu;