mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 14:13:09 +00:00
6d837c9e26
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.
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
/*
|
|
* \brief Client-side parent interface
|
|
* \author Norman Feske
|
|
* \date 2006-05-10
|
|
*/
|
|
|
|
/*
|
|
* 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__PARENT__CLIENT_H_
|
|
#define _INCLUDE__PARENT__CLIENT_H_
|
|
|
|
#include <parent/capability.h>
|
|
#include <base/rpc_client.h>
|
|
|
|
namespace Genode {
|
|
|
|
struct Parent_client : Rpc_client<Parent>
|
|
{
|
|
explicit Parent_client(Parent_capability parent)
|
|
: Rpc_client<Parent>(parent) { }
|
|
|
|
void exit(int exit_value) { call<Rpc_exit>(exit_value); }
|
|
|
|
void announce(Service_name const &service, Root_capability root) {
|
|
call<Rpc_announce>(service, root); }
|
|
|
|
Session_capability session(Service_name const &service,
|
|
Session_args const &args,
|
|
Affinity const &affinity) {
|
|
return call<Rpc_session>(service, args, affinity); }
|
|
|
|
void upgrade(Session_capability to_session, Upgrade_args const &args) {
|
|
call<Rpc_upgrade>(to_session, args); }
|
|
|
|
void close(Session_capability session) { call<Rpc_close>(session); }
|
|
|
|
Thread_capability main_thread_cap() const {
|
|
return call<Rpc_main_thread>(); }
|
|
};
|
|
}
|
|
|
|
#endif /* _INCLUDE__PARENT__CLIENT_H_ */
|