lkml.org 
[lkml]   [2012]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 2/4] timers: Consolidate base->next_timer update
Date
> 
> -static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> +static void
> +__internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> {
> unsigned long expires = timer->expires;
> unsigned long idx = expires - base->timer_jiffies;
> @@ -372,6 +373,17 @@ static void internal_add_timer(struct tv
> list_add_tail(&timer->entry, vec);
> }
>
> +static void internal_add_timer(struct tvec_base *base, struct timer_list *timer)
> +{
> + __internal_add_timer(base, timer);
> + /*
> + * Update base->next_timer if this is the earliest one.
> + */
> + if (time_before(timer->expires, base->next_timer) &&
> + !tbase_get_deferrable(timer->base))
> + base->next_timer = timer->expires;
> +}
> +
>
Shouldn't this be like this?

+ /*
+ * Update base->next_timer if this is the earliest one.
+ */
+ if (time_before(timer->expires, base->next_timer) &&
+ !tbase_get_deferrable(timer->base))
+ base->next_timer = timer->expires;
+ __internal_add_timer(base, timer);
As per the below code?

> #ifdef CONFIG_TIMER_STATS
> void __timer_stats_timer_set_start_info(struct timer_list *timer, void *addr)
> {
> @@ -757,9 +769,6 @@ __mod_timer(struct timer_list *timer, un
> }
>
> timer->expires = expires;
> - if (time_before(timer->expires, base->next_timer) &&
> - !tbase_get_deferrable(timer->base))
> - base->next_timer = timer->expires;
> internal_add_timer(base, timer);
>



\
 
 \ /
  Last update: 2012-05-29 09:21    [from the cache]
©2003-2011 Jasper Spaans