Best way to handle external interrupt ?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

We have started out first embedded linux project (first linux project)
with a PPC board from men with ElinOS (Linux 2.4).  This PPC has a
number of external interrupt inputs, and we would like to use one of
these as an external sync input. An external 50Hz signal is connected
to the interrupt. What is the best/ standard way to handle such an
interrupt in Linux ? Do we need to write a device driver, or can we
handle such an interrupt in user code ? We are using pthreads, and
would like to signal a semaphore in a task when the interrupt occurs.
Any pointers to help us on the correct track would be welcome.

Regards
   Anton Erasmus

Re: Best way to handle external interrupt ?

Quoted text here. Click to load it

Install an interrupt handler.

Quoted text here. Click to load it

Yes.


No, you cannot handle interrupts in user space.

Quoted text here. Click to load it

You can implement your driver such that your application can wait for
events (like an interrupt) using standard poll() / select() calls.


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88   Web: www.denx.de
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline