Re: [PATCH 2/2] mutex: use spin_[un]lock instead ofarch_spin_[un]lock

From: Ingo Molnar
Date: Tue Jan 29 2013 - 04:29:04 EST



* nan chen <nachenn@xxxxxxxxx> wrote:

> > #define spin_lock_mutex(lock, flags) \
> > do { \
> > struct mutex *l = container_of(lock, struct mutex,
> > wait_lock); \
> > \
> > DEBUG_LOCKS_WARN_ON(in_interrupt()); \
> > local_irq_save(flags); \
> > arch_spin_lock(&(lock)->rlock.raw_lock);\
> > DEBUG_LOCKS_WARN_ON(l->magic != l); \
> > } while (0)
> >
> > The original question was why mutex-debug.h (unmodified) uses
> > irq disabling.
> >
> > Thanks,
> >
> > Ingo
> >
>
> So, the reason why you use WARN_ON here is try to keep things
> going?

What would be the alternative?

Thanks,

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/