2016-03-30 15:34:37 +02:00
|
|
|
/*
|
|
|
|
* \brief Client-side of the Linux-specific CPU session interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2012-08-15
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2012-2017 Genode Labs GmbH
|
2016-03-30 15:34:37 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2016-03-30 15:34:37 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__LINUX_NATIVE_CPU__CLIENT_H_
|
|
|
|
#define _INCLUDE__LINUX_NATIVE_CPU__CLIENT_H_
|
|
|
|
|
|
|
|
#include <linux_native_cpu/linux_native_cpu.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
|
|
|
namespace Genode { struct Linux_native_cpu_client; }
|
|
|
|
|
|
|
|
struct Genode::Linux_native_cpu_client : Rpc_client<Linux_native_cpu>
|
|
|
|
{
|
|
|
|
explicit Linux_native_cpu_client(Capability<Native_cpu> cap)
|
|
|
|
: Rpc_client<Linux_native_cpu>(static_cap_cast<Linux_native_cpu>(cap)) { }
|
|
|
|
|
2019-02-14 22:39:08 +01:00
|
|
|
void thread_id(Thread_capability thread, int pid, int tid) override {
|
2016-03-30 15:34:37 +02:00
|
|
|
call<Rpc_thread_id>(thread, pid, tid); }
|
|
|
|
|
2019-02-14 22:39:08 +01:00
|
|
|
Untyped_capability server_sd(Thread_capability thread) override {
|
2016-03-30 15:34:37 +02:00
|
|
|
return call<Rpc_server_sd>(thread); }
|
|
|
|
|
2019-02-14 22:39:08 +01:00
|
|
|
Untyped_capability client_sd(Thread_capability thread) override {
|
2016-03-30 15:34:37 +02:00
|
|
|
return call<Rpc_client_sd>(thread); }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _INCLUDE__LINUX_NATIVE_CPU__CLIENT_H_ */
|