lkml.org 
[lkml]   [2002]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: interrupt - spin lock question
From
Date
On Mon, 2002-03-04 at 01:33, sridharv@ufl.edu wrote:

> ok things are clear now. so the spin_lock_irq friends are actually for 2
> purposes - preventing racing from interrupts and from SMP. so if SMP is not
> chosen only the local_irq_disable() part works right??
>
> do { local_irq_disable(); spin_lock(lock); } while (0)

Correct. Although, you would want to use spin_lock_irqsave most of the
time, not spin_lock_irq (difference is, the stored flags value is used
to restore interrupts to there previous condition instead of
unconditionally reenable them).

Btw, Go Gators!

Robert Love

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

\
 
 \ /
  Last update: 2005-03-22 13:21    [W:0.102 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site