Imported Genode release 11.11

This commit is contained in:
Genode Labs
2011-12-22 16:19:25 +01:00
committed by Christian Helmuth
parent 6bcc9aef0e
commit da4e1feaa5
2462 changed files with 320115 additions and 3 deletions

View File

@@ -0,0 +1,41 @@
/*
* \brief Client-side interface of the Hello service
* \author Björn Döbel
* \date 2008-03-20
*/
/*
* Copyright (C) 2008-2011 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__HELLO_SESSION_H__CLIENT_H_
#define _INCLUDE__HELLO_SESSION_H__CLIENT_H_
#include <hello_session/hello_session.h>
#include <base/rpc_client.h>
#include <base/printf.h>
namespace Hello {
struct Session_client : Genode::Rpc_client<Session>
{
Session_client(Genode::Capability<Session> cap)
: Genode::Rpc_client<Session>(cap) { }
void say_hello()
{
PDBG("Saying Hello.");
call<Rpc_say_hello>();
}
int add(int a, int b)
{
return call<Rpc_add>(a, b);
}
};
}
#endif /* _INCLUDE__HELLO_SESSION_H__CLIENT_H_ */

View File

@@ -0,0 +1,34 @@
/*
* \brief Connection to Hello service
* \author Norman Feske
* \date 2008-11-10
*/
/*
* Copyright (C) 2008-2011 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__HELLO_SESSION__CONNECTION_H_
#define _INCLUDE__HELLO_SESSION__CONNECTION_H_
#include <hello_session/client.h>
#include <base/connection.h>
namespace Hello {
struct Connection : Genode::Connection<Session>, Session_client
{
Connection()
:
/* create session */
Genode::Connection<Hello::Session>(session("foo, ram_quota=4K")),
/* initialize RPC interface */
Session_client(cap()) { }
};
}
#endif /* _INCLUDE__HELLO_SESSION__CONNECTION_H_ */

View File

@@ -0,0 +1,41 @@
/*
* \brief Interface definition of the Hello service
* \author Björn Döbel
* \date 2008-03-20
*/
/*
* Copyright (C) 2008-2011 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__HELLO_SESSION__HELLO_SESSION_H_
#define _INCLUDE__HELLO_SESSION__HELLO_SESSION_H_
#include <session/session.h>
#include <base/rpc.h>
namespace Hello {
struct Session : Genode::Session
{
static const char *service_name() { return "Hello"; }
virtual void say_hello() = 0;
virtual int add(int a, int b) = 0;
/*******************
** RPC interface **
*******************/
GENODE_RPC(Rpc_say_hello, void, say_hello);
GENODE_RPC(Rpc_add, int, add, int, int);
GENODE_RPC_INTERFACE(Rpc_say_hello, Rpc_add);
};
}
#endif /* _INCLUDE__HELLO_SESSION__HELLO_SESSION_H_ */