mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
hello_tutorial: Made hello session stateful.
This commit is contained in:
@@ -22,14 +22,15 @@ namespace Hello { struct Connection; }
|
||||
|
||||
struct Hello::Connection : Genode::Connection<Session>, Session_client
|
||||
{
|
||||
Connection(Genode::Env &env)
|
||||
:
|
||||
/* create session */
|
||||
Genode::Connection<Hello::Session>(env, session(env.parent(),
|
||||
"ram_quota=6K, cap_quota=4")),
|
||||
Connection(Genode::Env &env, unsigned short id)
|
||||
: /* create session */
|
||||
Genode::Connection<Hello::Session>(env, session(env.parent(),
|
||||
"ram_quota=6K, cap_quota=4")),
|
||||
|
||||
/* initialize RPC interface */
|
||||
Session_client(cap()) { }
|
||||
/* initialize RPC interface */
|
||||
Session_client(cap())
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__HELLO_SESSION__CONNECTION_H_ */
|
||||
|
||||
@@ -24,6 +24,8 @@ struct Hello::Session : Genode::Session
|
||||
{
|
||||
static const char *service_name() { return "Hello"; }
|
||||
|
||||
unsigned short _id;
|
||||
|
||||
enum { CAP_QUOTA = 2 };
|
||||
|
||||
virtual void say_hello() = 0;
|
||||
|
||||
Reference in New Issue
Block a user