Re: [PATCH] Add support for deferrable timers (respun)

Oleg Nesterov
2007-03-27T22:31:23Z

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.