mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-19 16:41:26 +00:00
Provide main thread cap via parent interface
Preparation to solve issue #10
This commit is contained in:
parent
664e0dc7cd
commit
105ff5dfed
base
@ -265,6 +265,7 @@ namespace Genode {
|
||||
void upgrade(Session_capability, Upgrade_args const &);
|
||||
void close(Session_capability);
|
||||
void exit(int);
|
||||
Thread_capability main_thread_cap() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,8 @@ namespace Genode {
|
||||
}
|
||||
|
||||
Pd_session_capability pd_session_cap() const { return _pd.cap(); }
|
||||
|
||||
Thread_capability main_thread_cap() const { return _thread0_cap; }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,9 @@ namespace Genode {
|
||||
call<Rpc_upgrade>(to_session, args); }
|
||||
|
||||
void close(Session_capability session) { call<Rpc_close>(session); }
|
||||
|
||||
Thread_capability main_thread_cap() const {
|
||||
return call<Rpc_main_thread>(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <base/exception.h>
|
||||
#include <base/rpc.h>
|
||||
#include <base/rpc_args.h>
|
||||
#include <base/thread.h>
|
||||
#include <session/capability.h>
|
||||
#include <root/capability.h>
|
||||
|
||||
@ -128,6 +129,10 @@ namespace Genode {
|
||||
*/
|
||||
virtual void close(Session_capability session) = 0;
|
||||
|
||||
/**
|
||||
* Provide thread_cap of main thread
|
||||
*/
|
||||
virtual Thread_capability main_thread_cap() const = 0;
|
||||
|
||||
/*********************
|
||||
** RPC declaration **
|
||||
@ -143,9 +148,10 @@ namespace Genode {
|
||||
GENODE_TYPE_LIST(Quota_exceeded),
|
||||
Session_capability, Upgrade_args const &);
|
||||
GENODE_RPC(Rpc_close, void, close, Session_capability);
|
||||
GENODE_RPC(Rpc_main_thread, Thread_capability, main_thread_cap);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_exit, Rpc_announce, Rpc_session, Rpc_upgrade,
|
||||
Rpc_close);
|
||||
Rpc_close, Rpc_main_thread);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,16 @@ namespace Genode {
|
||||
throw Quota_exceeded();
|
||||
}
|
||||
|
||||
void close(Session_capability) {
|
||||
PDBG("implement me, please"); }
|
||||
void close(Session_capability)
|
||||
{
|
||||
PDBG("implement me, please");
|
||||
}
|
||||
|
||||
Thread_capability main_thread_cap() const
|
||||
{
|
||||
PDBG("implement me, please");
|
||||
return Thread_capability();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user