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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to