Re: [patch 05/15] Generic Mutex Subsystem, mutex-core.patch

From: Ingo Molnar
Date: Wed Dec 21 2005 - 11:02:10 EST



* Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> > +start_mutex_timer(struct timer_list *timer, unsigned long time,
> > + unsigned long *expire)
> > +{
> > + *expire = time + jiffies;
> > + init_timer(timer);
> > + timer->expires = *expire;
> > + timer->data = (unsigned long)current;
> > + timer->function = process_timeout;
> > + add_timer(timer);
> > +}
>
> How about
> setup_timer(&timer, process_timeout, (unsigned long)current);
> __mod_timer(&timer, *expire);
> ?

i've removed the timer code from the latest queue - because it's unused
and we can add it back later. But you are right, it was racy (Arjan
noticed the signal race too), because this codepath in -rt relied on
guaranteed lock-passing. (while mutex.c does a trylock)

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