Skip to contentSkip to conversation

Interfacing user application and interrupt.

DISCUSSION John Francis 2 participants 2 messages Jul 21, 2001

lore
Share & tools
lore
#0 lore raw

Hello,

I have a situation where one of the controller on my board can generate interrupt which I am planning to use as a signal for a user process to go and read some data from "serial port or socket".

How is this task commonly done?

What I want to happen is

A *UNIX user process* waits for interrupt to go off. When the interrupt is generated it goes and reads from /dev/tty or a socket.

I also have ppc linux interrupt handler that correctly detects the interrupt from the device. Now what I am missing is how does the kernel interrupt handler indicate to the user process that there was an interrupt and user process needs to do its thing....

Any pointers on how to do this properly?

-John

Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:

I also have ppc linux interrupt handler that correctly detects the interrupt from the device. Now what I am missing is how does the kernel interrupt handler indicate to the user process that there was an interrupt and user process needs to do its thing....

Either make your user process block in a read / write / ioctl system call, and wake it from your interrupt handler, or implement a select() / poll() interface, so you don't have to block waiting for this event alone.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] In C we had to code our own bugs, in C++ we can inherit them.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/