alarmtimer: Switch over to generic set/get/rearm routine

All required callbacks are in place. Switch the alarm timer based posix
interval timer callbacks to the common implementation and remove the
incorrect private implementation.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20170530211657.825471962@linutronix.de
This commit is contained in:
Thomas Gleixner 2017-05-30 23:15:59 +02:00
parent b3bf6f369d
commit f2c45807d3
3 changed files with 29 additions and 110 deletions

View file

@ -637,8 +637,7 @@ static int common_hrtimer_forward(struct k_itimer *timr, ktime_t now)
* it is the same as a requeue pending timer WRT to what we should
* report.
*/
static void
common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting)
void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting)
{
const struct k_clock *kc = timr->kclock;
ktime_t now, remaining, iv;
@ -768,10 +767,9 @@ static int common_hrtimer_try_to_cancel(struct k_itimer *timr)
}
/* Set a POSIX.1b interval timer. */
static int
common_timer_set(struct k_itimer *timr, int flags,
struct itimerspec64 *new_setting,
struct itimerspec64 *old_setting)
int common_timer_set(struct k_itimer *timr, int flags,
struct itimerspec64 *new_setting,
struct itimerspec64 *old_setting)
{
const struct k_clock *kc = timr->kclock;
bool sigev_none;
@ -855,7 +853,7 @@ retry:
return error;
}
static int common_timer_del(struct k_itimer *timer)
int common_timer_del(struct k_itimer *timer)
{
const struct k_clock *kc = timer->kclock;