genode/base/include/root/client.h
Norman Feske 6d837c9e26 Attach affinity information to session requests
This patch extends the 'Parent::session()' and 'Root::session()'
functions with an additional 'affinity' parameter, which is inteded to
express the preferred affinity of the new session. For CPU sessions
provided by core, the values will be used to select the set of CPUs
assigned to the CPU session. For other services, the session affinity
information can be utilized to optimize the locality of the server
thread with the client. For example, to enable the IRQ session to route
an IRQ to the CPU core on which the corresponding device driver (the IRQ
client) is running.
2013-08-13 17:08:25 +02:00

39 lines
905 B
C++

/*
* \brief Root client interface
* \author Norman Feske
* \date 2006-05-11
*/
/*
* Copyright (C) 2006-2013 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__ROOT__CLIENT_H_
#define _INCLUDE__ROOT__CLIENT_H_
#include <root/capability.h>
#include <base/rpc_client.h>
namespace Genode {
struct Root_client : Rpc_client<Root>
{
explicit Root_client(Root_capability root)
: Rpc_client<Root>(root) { }
Session_capability session(Session_args const &args, Affinity const &affinity) {
return call<Rpc_session>(args, affinity); }
void upgrade(Session_capability session, Upgrade_args const &args) {
call<Rpc_upgrade>(session, args); }
void close(Session_capability session) {
call<Rpc_close>(session); }
};
}
#endif /* _INCLUDE__ROOT__CLIENT_H_ */