Hi Norman,
A statement "Genode::Cpu_session_capability h_cap(Genode::env()->parent()->session("CPU","ram_quota=4K"));" that can be compiled before triggers the following error message now:
/home/tianc/git/omnios/genode/base/include/base/capability.h: In member function Genode::Untyped_capability Genode::Capability<RPC_INTERFACE, BCT>::_check_compatibility(const Genode::Capability<FROM_RPC_INTERFACE, FROM_BCT>&) [with FROM_RPC_INTERFACE = Genode::Session, FROM_BCT = Genode::Native_capability, RPC_INTERFACE = Genode::Cpu_session, BCT = Genode::Native_capability]: /home/tianc/git/omnios/genode/base/include/base/capability.h:147: instantiated from Genode::Capability<RPC_INTERFACE, BCT>::Capability(const Genode::Capability<FROM_RPC_INTERFACE, FROM_BCT>&) [with FROM_RPC_INTERFACE = Genode::Session, FROM_BCT = Genode::Native_capability, RPC_INTERFACE = Genode::Cpu_session, BCT = Genode::Native_capability] /home/tianc/git/omnios/genode-omnios/examples/thread-migration/src/app/32/.. /main.cc:18: instantiated from here /home/tianc/git/omnios/genode/base/include/base/capability.h:128: error: invalid conversion from Genode::Session* to Genode::Cpu_session* make[3]: *** [../main.o] Error 1 make[2]: *** [thread-migration.prg] Error 2 make[1]: *** [gen_deps_and_build_targets] Error 2 make[1]: Leaving directory `/home/tianc/git/omnios/build/genode-build-omnios'
I cannot figure out what's going on.
Best, Chen
-----Original Message----- From: Norman Feske [mailto:norman.feske@...1...] Sent: Wednesday, June 01, 2011 9:41 PM To: genode-main@lists.sourceforge.net Subject: Re: Current genode release
Hi Daniel,
Foc_cpu_session to build. Question is, how do you introduce a new type (e.g., struct) to be used as part of an RPC signature? Do you have to somewhere say how to marshal/unmarshal that type?
there are no special precautions needed. Any type can be used as RPC argument as long as the following conditions are met:
* The type is self-sufficient, i.e., does not contain pointers and references
* The type has a default constructor
The in/out direction is steered by the 'const' qualifier used for reference arguments and, if more flexibility is needed, by the 'Trait::Rpc_direction' type trait. For a more detailed explanation, please have a look at the Section "Transferable argument types" of the current release notes:
http://genode.org/documentation/release-notes/11.05#section-4
Best regards Norman