* Interfacing user application and interrupt.
@ 2001-07-21 10:13 John Francis
2001-07-21 11:45 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: John Francis @ 2001-07-21 10:13 UTC (permalink / raw)
To: linuxppc-embedded
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Interfacing user application and interrupt.
2001-07-21 10:13 Interfacing user application and interrupt John Francis
@ 2001-07-21 11:45 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2001-07-21 11:45 UTC (permalink / raw)
To: John Francis; +Cc: linuxppc-embedded
In message <20010721101345.5964.qmail@web20104.mail.yahoo.com> 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: wd@denx.de
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-21 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-21 10:13 Interfacing user application and interrupt John Francis
2001-07-21 11:45 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).