IRQ handling

Norman Feske norman.feske at ...1...
Tue Jul 17 10:10:23 CEST 2012


Hello,

I agree with Stefan that implementing the IRQ session-interface by the
GPIO driver sounds like a good idea.

More generally speaking, if you have custom RPC interface and the server
needs to notify its client of an event in an asynchronous fashion,
Genode's signaling API is the way to go:


https://github.com/genodelabs/genode/blob/master/base/include/base/signal.h

For a good example where this facility is used, please refer to the
terminal-session interface:


https://github.com/genodelabs/genode/blob/master/os/include/terminal_session/terminal_session.h

Here the client can register a signal handler via the
'read_avail_sigh()' RPC call. The registered signal handler will receive
a signal each time when new input becomes available for reading. (for
example, when the user presses a key on an interactive terminal)

BTW, you will notice that, as of now, the IRQ session interface is not
using the signaling mechanism. It is using a blocking 'wait_for_irq()'
RPC call to wait for IRQs instead. However, we will possibly revisit the
interface in this respect in the future.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list