mpc / linux kernel - user space

Dan Malek dan at embeddededge.com
Sat Nov 29 02:42:34 EST 2003


Jaap-Jan Boor wrote:

> If you want to send a signal to user code, you can use kill_proc()
> I think.

IMHO, trying to use signals to propagate a hardware interrupt to a
user application is complicated and has design flaws (what happens
if the application "misses" an interrupt or gets blocked for some
reason).

A couple of other methods that I find simple and use extensively
are multi-threading the application and then using a different
minor ID device to wait on a read() or ioctl() to simply return.
The driver just uses the standard sleep/wakeup mechanisms to
synchronize with the application.

Another, and I think most useful, method is to implement a select/poll
entry point in the driver.  It provides the most flexibility when
waiting for various events, plus provides a timeout should something
fail to function properly.


	-- Dan


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





More information about the Linuxppc-embedded mailing list