Re: Interrupt handling

From: George Anzinger
Date: Thu Oct 16 2003 - 13:54:56 EST


Sanil K wrote:
Hi all,

This may be a generic problem as far as a driver is concerned.

We need to handle an interrupt and inform the user space on the event and
pass the data correspodning to the event.

The event can be informed through SIGNAL and the signal handler can be
invoked in the user space. Then again for data, we need to have the
"copy_to_user" mechanism .

Is there any other effective mechanism(s) to handle the interrupt. I mean
we need to convey the event and or data to the user space(prefer -
asynchronously).

IF the amount of data is small, say a word or two or less, you can use the siginfo and a realtime signal. This will get the data at the same time as the signal. If you prefer to avoid the overhead of the signal, you can do sigwaitinfo() which avoids the floating point save/restore, but does require the task to wait (i.e. is not asynchronous).




--
George Anzinger george@xxxxxxxxxx
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/