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.
71 lines
1.4 KiB
C++
71 lines
1.4 KiB
C++
/*
|
|
* \brief Core-specific parent client implementation
|
|
* \author Norman Feske
|
|
* \author Christian Helmuth
|
|
* \date 2006-07-20
|
|
*/
|
|
|
|
/*
|
|
* 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 _CORE__INCLUDE__CORE_PARENT_H_
|
|
#define _CORE__INCLUDE__CORE_PARENT_H_
|
|
|
|
#include <base/printf.h>
|
|
#include <parent/parent.h>
|
|
|
|
namespace Genode {
|
|
|
|
/**
|
|
* In fact, Core has _no_ parent. But most of our libraries could work
|
|
* seamlessly inside Core too, if it had one. Core_parent fills this gap.
|
|
*/
|
|
class Core_parent : public Parent
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
Core_parent() { }
|
|
|
|
|
|
/**********************
|
|
** Parent interface **
|
|
**********************/
|
|
|
|
void exit(int);
|
|
|
|
void announce(Service_name const &, Root_capability)
|
|
{
|
|
PDBG("implement me, please");
|
|
}
|
|
|
|
Session_capability session(Service_name const &, Session_args const &,
|
|
Affinity const &);
|
|
|
|
void upgrade(Session_capability, Upgrade_args const &)
|
|
{
|
|
PDBG("implement me, please");
|
|
throw Quota_exceeded();
|
|
}
|
|
|
|
void close(Session_capability)
|
|
{
|
|
PDBG("implement me, please");
|
|
}
|
|
|
|
Thread_capability main_thread_cap() const
|
|
{
|
|
PDBG("implement me, please");
|
|
return Thread_capability();
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif /* _CORE__INCLUDE__CORE_PARENT_H_ */
|