lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [patch 18/28] posix-timers: Convert timer_delete() to clockid_to_kclock()
From
Date
On Tue, 2011-02-01 at 13:52 +0000, Thomas Gleixner wrote:
> plain text document attachment (posix-timers-convert-timer-del.patch)
> Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
> and use the new decoding function. No need to check for the return
> value of it. If we have data corruption in the timer, we explode
> somewhere else anyway. Also all kclocks which implement timer_create()
> need to provide timer_delete() as well.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Richard Cochran <richard.cochran@omicron.at>
> ---
[snip]
> @@ -852,7 +854,9 @@ static inline int common_timer_del(struc
>
> static inline int timer_delete_hook(struct k_itimer *timer)
> {
> - return CLOCK_DISPATCH(timer->it_clock, timer_del, (timer));
> + struct k_clock *kc = clockid_to_kclock(timer->it_clock);
> +
> + return kc->timer_del(timer);
> }

Again, kc == NULL check.

thanks
-john



\
 
 \ /
  Last update: 2011-02-01 22:27    [W:0.307 / U:0.152 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site