2011-12-22 15:19:25 +00:00
|
|
|
/*
|
|
|
|
* \brief Client-side cpu session interface
|
|
|
|
* \author Christian Helmuth
|
|
|
|
* \date 2006-07-12
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2006-2017 Genode Labs GmbH
|
2011-12-22 15:19:25 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE__CPU_SESSION__CLIENT_H_
|
|
|
|
#define _INCLUDE__CPU_SESSION__CLIENT_H_
|
|
|
|
|
|
|
|
#include <cpu_session/capability.h>
|
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
namespace Genode { struct Cpu_session_client; }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
struct Genode::Cpu_session_client : Rpc_client<Cpu_session>
|
|
|
|
{
|
|
|
|
explicit Cpu_session_client(Cpu_session_capability session)
|
|
|
|
: Rpc_client<Cpu_session>(session) { }
|
2012-05-28 14:57:09 +00:00
|
|
|
|
2024-06-17 16:19:07 +00:00
|
|
|
Create_thread_result
|
2016-05-04 10:27:17 +00:00
|
|
|
create_thread(Capability<Pd_session> pd, Name const &name,
|
|
|
|
Affinity::Location affinity, Weight weight, addr_t utcb = 0) override {
|
|
|
|
return call<Rpc_create_thread>(pd, name, affinity, weight, utcb); }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
void kill_thread(Thread_capability thread) override {
|
|
|
|
call<Rpc_kill_thread>(thread); }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2016-05-10 16:05:38 +00:00
|
|
|
void exception_sigh(Signal_context_capability sigh) override {
|
|
|
|
call<Rpc_exception_sigh>(sigh); }
|
2012-09-04 15:32:55 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
Affinity::Space affinity_space() const override {
|
|
|
|
return call<Rpc_affinity_space>(); }
|
2013-08-09 09:11:03 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
Dataspace_capability trace_control() override {
|
|
|
|
return call<Rpc_trace_control>(); }
|
2013-08-09 09:11:03 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
int ref_account(Cpu_session_capability session) override {
|
|
|
|
return call<Rpc_ref_account>(session); }
|
2014-10-16 09:15:46 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
int transfer_quota(Cpu_session_capability session, size_t amount) override {
|
|
|
|
return call<Rpc_transfer_quota>(session, amount); }
|
2014-10-16 09:15:46 +00:00
|
|
|
|
2015-03-27 13:05:55 +00:00
|
|
|
Quota quota() override { return call<Rpc_quota>(); }
|
2016-03-30 13:34:37 +00:00
|
|
|
|
|
|
|
Capability<Native_cpu> native_cpu() override { return call<Rpc_native_cpu>(); }
|
2015-03-04 20:12:14 +00:00
|
|
|
};
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__CPU_SESSION__CLIENT_H_ */
|