mpc / linux kernel - user space

Jaap-Jan Boor jjboor at aimsys.nl
Mon Dec 1 19:18:55 EST 2003


On Fri, 2003-11-28 at 16:42, Dan Malek wrote:
> 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).

Fortunately I never used it (that's the 'I think')

>
> 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.

Yes, especially the timeout is nice as 'this should never happen'
failures never happens except with the customer

Jaap-Jan

>
>
> 	-- Dan
>
>


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





More information about the Linuxppc-embedded mailing list