synchronous bulk transfer.
Norman Feske
norman.feske at ...1...
Thu Sep 10 17:58:31 CEST 2015
Hello Mohammad,
On 10.09.2015 16:01, Mohammad Hamad wrote:
> I am trying to send big buffer using RPC call. to do that I used to
> divide the buffer and send it many time . I read about the synchronous
> bulk transfer, by using shared memory with the synchronous RPC. are
> there any samples about using this method.
I recommend to look at the timer-session RPC interface (Section "4.5.3.
Terminal and UART" of the documentation [1]) as a reference:
https://github.com/genodelabs/genode/tree/master/repos/os/include/terminal_session
Please note the difference between the declaration of the read/write
functions and the RPC_FUNCTION declarations of 'Rpc_read' and
'Rpc_write'. The read/write functions are plain virtual functions
implemented in 'client.c'. Those functions take a size and a pointer to
a buffer as arguments. They copy the payload from/to the shared memory
buffer and issue the RPC calls. The Rpc_read/Rpc_write definitions
merely contain the size argument but no buffer pointer. Whereas the
payload is transferred via the shared-memory buffer, the size is
transmitted as an RPC-function argument.
For more examples, you may also have a look at the input session and the
report session.
[1] http://genode.org/documentation/genode-foundations-15-05.pdf
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