wait_event and interrupts

Jeff Angielski jeff at theptrgroup.com
Wed Sep 21 04:40:16 EST 2005

On Tue, 2005-09-20 at 12:56 -0500, Rune Torgersen wrote:

> Is there a better way of doing this?

If you *must* share the variable between interrupt and non-interrupt
context, you must mutex it in an interrupt safe way.  The use of
spin_lock_irqsave() comes to mind for you read function.

But you are going to have other problems with this approach anyways
since you "appear" to be assuming a one-to-one relationship between your
interrupt handler and the read function.  Is that really true?

Jeff Angielski
The PTR Group

More information about the Linuxppc-embedded mailing list