lkml.org 
[lkml]   [1999]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Problems writting a CHAR Driver with interruptible_sleep (wait_queu e)
A quick solution is to turn off interrupts with a cli() immediately before you
tell the device that you want them. When you call interuptible_sleep, Linux
will enable interrupts after you are safely in the wait queue, and any pending
interrupts will occur. To avoid losing interrupts, however, you might want
implement some kind of queue to hold messages. You would still use a cli() to
make sure everything happened atomically, however. The correct implementation
really depends on how your device functions.

-Andy Putman



-
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/

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