Re: Using Hardware Interrupts to invoke a user space action
Markus Franke <[email protected]> Fri, 11 Apr 2008 08:15:17 +0200
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
Hi Fahd, Zitat von Fahd Abidi <[email protected]>: > Is this possible? Can any one tell me how this could be done? What > functions can I use to pass a signal from kernel space to user space to > invoke an action in my application. Sounds like there may be thread > access issues here as the handler could invoke a write to my buffer in > memory just as I am issuing a read command to read the contents of that > buffer. Any suggestions will be greatly appreciated, as I mentioned I am > new to this arena. well this is more or less a general question about linux device driver development. Have you had a look at [3]? What you are looking for, might be the functionality of Waitqueues. (see also [3]) Your reading application will block in the driver on the Waitqueue (wait_event_*). The interrupt handler then again will wake up this Waitqueue and in turn the read() call from the application will return. This scheme is describe in detail in [3]. Hope this helps, Markus [3] Linux Device Drivers, Corbet, Rubini, Kroah-Hartman, 3rd Editition, O'Reily --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list.