RE: Using Hardware Interrupts to invoke a user spaceaction

"Fahd Abidi" <[email protected]> Fri, 11 Apr 2008 07:42:06 -0400
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <071DB0C788671B48940BC79F8B4930692DC1A8@ultsol01.tewks.ultsol.local>
Actually I read O'Reily last night and got a better Idea of how to
implement this. Although I was using the 2nd edition so maybe the
material was a little dated. I will pick up the 3rd edition today. There
was no mention of waitqueue's in the 2nd edition so I guess I will first
read the book before reposting....

thanks!

Fahd

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Markus Franke
Sent: Friday, April 11, 2008 2:33 AM
To: Fahd Abidi
Cc: [email protected]
Subject: Re: [ColdFire] Using Hardware Interrupts to invoke a user
spaceaction

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.




---
[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.