Follow-up tweaks for issue #145
Because we use to pass a policy class to 'Native_capability_tpl' we can pass the dst type as part of the policy instead of as a separate template argument. This patch also adds documentation of the POLICY interface as expected by 'Native_capability_tpl'.
This commit is contained in:
@@ -30,17 +30,16 @@ namespace Genode {
|
||||
|
||||
Native_thread_id my_thread_id();
|
||||
|
||||
|
||||
struct Thread_id_check
|
||||
{
|
||||
static bool valid(Kernel::Thread_id tid) {
|
||||
typedef Kernel::Thread_id Dst;
|
||||
static bool valid(Dst tid) {
|
||||
return tid != Kernel::INVALID_THREAD_ID; }
|
||||
static Kernel::Thread_id invalid()
|
||||
static Dst invalid()
|
||||
{ return Kernel::INVALID_THREAD_ID; }
|
||||
};
|
||||
|
||||
|
||||
typedef Native_capability_tpl<Kernel::Thread_id,Thread_id_check> Native_capability;
|
||||
typedef Native_capability_tpl<Thread_id_check> Native_capability;
|
||||
typedef int Native_connection_state;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user