2012-08-15 19:14:05 +02:00
|
|
|
/*
|
|
|
|
* \brief Client-side PD session interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2012-08-15
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2013-01-10 21:44:47 +01:00
|
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
2012-08-15 19:14:05 +02:00
|
|
|
*
|
|
|
|
* 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__LINUX_PD_SESSION__CLIENT_H_
|
|
|
|
#define _INCLUDE__LINUX_PD_SESSION__CLIENT_H_
|
|
|
|
|
|
|
|
#include <linux_pd_session/linux_pd_session.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
namespace Genode { struct Linux_pd_session_client; }
|
2012-08-15 19:14:05 +02:00
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
struct Genode::Linux_pd_session_client : Rpc_client<Linux_pd_session>
|
|
|
|
{
|
|
|
|
explicit Linux_pd_session_client(Capability<Linux_pd_session> session)
|
|
|
|
: Rpc_client<Linux_pd_session>(session) { }
|
2012-08-15 19:14:05 +02:00
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
int bind_thread(Thread_capability thread) override {
|
|
|
|
return call<Rpc_bind_thread>(thread); }
|
2012-08-15 19:14:05 +02:00
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
int assign_parent(Capability<Parent> parent) override {
|
|
|
|
return call<Rpc_assign_parent>(parent); }
|
2012-08-15 19:14:05 +02:00
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
bool assign_pci(addr_t pci_config_memory_address, uint16_t bdf) override {
|
|
|
|
return call<Rpc_assign_pci>(pci_config_memory_address, bdf); }
|
2012-08-15 19:14:05 +02:00
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
Signal_source_capability alloc_signal_source() override {
|
|
|
|
return call<Rpc_alloc_signal_source>(); }
|
2012-08-15 19:14:05 +02:00
|
|
|
|
2016-01-14 13:22:00 +01:00
|
|
|
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); }
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************
|
|
|
|
* Linux-specific extension **
|
|
|
|
*****************************/
|
|
|
|
|
|
|
|
void start(Capability<Dataspace> binary) {
|
|
|
|
call<Rpc_start>(binary); }
|
|
|
|
};
|
2012-08-15 19:14:05 +02:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__LINUX_PD_SESSION__CLIENT_H_ */
|