mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
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:
@ -94,8 +94,9 @@ namespace Genode {
|
||||
return (t1.tid != t2.tid) || (t1.pid != t2.pid); }
|
||||
|
||||
struct Thread_id_check {
|
||||
static bool valid(long id) { return id != 0; }
|
||||
static long invalid() { return 0; }
|
||||
typedef long Dst;
|
||||
static bool valid(Dst id) { return id != 0; }
|
||||
static Dst invalid() { return 0; }
|
||||
};
|
||||
|
||||
/**
|
||||
@ -103,7 +104,7 @@ namespace Genode {
|
||||
*/
|
||||
typedef struct { } Native_utcb;
|
||||
|
||||
typedef Native_capability_tpl<long, Thread_id_check> Native_capability;
|
||||
typedef Native_capability_tpl<Thread_id_check> Native_capability;
|
||||
typedef int Native_connection_state; /* socket descriptor */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user