On 03/28, Oleg Nesterov wrote:
>
> looks a little bit ugly, but may be this is just me. How about
> 
>       void timer_set_base(struct timer_list *timer, struct tvec_t_base_s 
> *new_base)
>       {
>               timer->base = (struct tvec_t_base_s *)
>                       ((unsigned long)(new_base) | 
> tbase_get_deferrable(timer->base));
>       }
> 
> __mod_timer:
>       -       tvec_base_t *old_base = timer->base;
>       -       timer->base = NULL;
>       +       timer_set_base(timer, NULL);
> 
> ?

Damn, forgot to say. With this change timer_get_deferrable(timer) always works,
even if changing the timer's base in progress.

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to