mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 23:42:32 +00:00
b49e588c1c
This patch replaces the former 'Pd_session::bind_thread' function by a PD-capability argument of the 'Cpu_session::create_thread' function, and removes the ancient thread-start protocol via 'Rm_session::add_client' and 'Cpu_session::set_pager'. Threads are now bound to PDs at their creation time and implicitly paged according to the address space of the PD. Note the API change: This patch changes the signature of the 'Child' and 'Process' constructors. There is a new 'address_space' argument, which represents the region map representing the child's address space. It is supplied separately to the PD session capability (which principally can be invoked to obtain the PD's address space) to allow the population of the address space without relying on an 'Pd_session::address_space' RPC call. Furthermore, a new (optional) env_pd argument allows the explicit overriding of the PD capability handed out to the child as part of its environment. It can be used to intercept the interaction of the child with its PD session at core. This is used by Noux. Issue #1938
69 lines
2.0 KiB
C++
69 lines
2.0 KiB
C++
/*
|
|
* \brief Client-side pd session interface
|
|
* \author Christian Helmuth
|
|
* \date 2006-07-12
|
|
*/
|
|
|
|
/*
|
|
* 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__PD_SESSION__CLIENT_H_
|
|
#define _INCLUDE__PD_SESSION__CLIENT_H_
|
|
|
|
#include <pd_session/capability.h>
|
|
#include <base/rpc_client.h>
|
|
|
|
namespace Genode { struct Pd_session_client; }
|
|
|
|
|
|
struct Genode::Pd_session_client : Rpc_client<Pd_session>
|
|
{
|
|
explicit Pd_session_client(Pd_session_capability session)
|
|
: Rpc_client<Pd_session>(session) { }
|
|
|
|
void assign_parent(Capability<Parent> parent) override {
|
|
call<Rpc_assign_parent>(parent); }
|
|
|
|
bool assign_pci(addr_t pci_config_memory_address, uint16_t bdf) override {
|
|
return call<Rpc_assign_pci>(pci_config_memory_address, bdf); }
|
|
|
|
Signal_source_capability alloc_signal_source() override {
|
|
return call<Rpc_alloc_signal_source>(); }
|
|
|
|
void free_signal_source(Signal_source_capability cap) override {
|
|
call<Rpc_free_signal_source>(cap); }
|
|
|
|
Signal_context_capability alloc_context(Signal_source_capability source,
|
|
unsigned long imprint) override {
|
|
return call<Rpc_alloc_context>(source, imprint); }
|
|
|
|
void free_context(Signal_context_capability cap) override {
|
|
call<Rpc_free_context>(cap); }
|
|
|
|
void submit(Signal_context_capability receiver, unsigned cnt = 1) override {
|
|
call<Rpc_submit>(receiver, cnt); }
|
|
|
|
Native_capability alloc_rpc_cap(Native_capability ep) override {
|
|
return call<Rpc_alloc_rpc_cap>(ep); }
|
|
|
|
void free_rpc_cap(Native_capability cap) override {
|
|
call<Rpc_free_rpc_cap>(cap); }
|
|
|
|
Capability<Region_map> address_space() override {
|
|
return call<Rpc_address_space>(); }
|
|
|
|
Capability<Region_map> stack_area() override {
|
|
return call<Rpc_stack_area>(); }
|
|
|
|
Capability<Region_map> linker_area() override {
|
|
return call<Rpc_linker_area>(); }
|
|
|
|
Capability<Native_pd> native_pd() override { return call<Rpc_native_pd>(); }
|
|
};
|
|
|
|
#endif /* _INCLUDE__PD_SESSION__CLIENT_H_ */
|