Re: spin_lock_irq vs. spin_lock_irqsave.

From: Tigran Aivazian (tigran@veritas.com)
Date: Mon Jun 26 2000 - 04:20:59 EST


Hi Pauline,

yes, I agree with your comment about
cond_wait_interruptible_timeout_irqrestore() not being inlined (and
standard -O2 setting won't allow gcc to inline things otherwise) so it
seems broken - I cc'd Peter Berger to fix it.

Regards,
Tigran

 On Thu, 22 Jun 2000, Pauline Middelink wrote:

> On Wed, 21 Jun 2000 around 18:47:33 +0100, Tigran Aivazian wrote:
> > On Sun, 18 Jun 2000, Andrew Morton wrote:
> > > BTW: CPU flags should always be saved and restored in the same function
> > > - it's not correct to pass the flags to another function and allow that
> > > function to restore them. Breaks on SPARC, apparently. Does Rusty's
> > > doc cover this??
> >
> > it maybe obvious (definitely is to most) but it may still be worth
> > mentioning that 'passing' flags to inline'd functions is ok, otherwise
> > people would get very confused when they look at
> > __schedule_tail()/reschedule_idle() interaction.
>
> Hmmm, than drivers/usb/serial/digi_acceleport.c
> cond_wait_interruptible_timeout_irqrestore() seems
> suspect. Its static but not explicitly inlined.
>
> Also line 649/650 seems strange to me, shouldn't the
> second one be a normal spinlock() because we know the
> irq's are off? (and not overwrite flags)
>
> Met vriendelijke groet,
> Pauline Middelink
>

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



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:08 EST