mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 06:07:59 +00:00
62b1c55399
This patch integrates the functionality of the former CAP session into the PD session and unifies the approch of supplementing the generic PD session with kernel-specific functionality. The latter is achieved by the new 'Native_pd' interface. The kernel-specific interface can be obtained via the Pd_session::native_pd accessor function. The kernel-specific interfaces are named Nova_native_pd, Foc_native_pd, and Linux_native_pd. The latter change allowed for to deduplication of the pd_session_component code among the various base platforms. To retain API compatibility, we keep the 'Cap_session' and 'Cap_connection' around. But those classes have become mere wrappers around the PD session interface. Issue #1841
63 lines
1.9 KiB
C++
63 lines
1.9 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) { }
|
|
|
|
int bind_thread(Thread_capability thread) override {
|
|
return call<Rpc_bind_thread>(thread); }
|
|
|
|
int assign_parent(Capability<Parent> parent) override {
|
|
return 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<Native_pd> native_pd() override { return call<Rpc_native_pd>(); }
|
|
};
|
|
|
|
#endif /* _INCLUDE__PD_SESSION__CLIENT_H_ */
|