mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Unify policy name for Native_capability_tpl.
This commit unifies the policy name for the template argument for Native_capability_tpl to Cap_dst_policy, like suggested by Norman in the discussion resulting from issue #145. Moreover, it takes the memcpy operation for copying a Native_capability out of the template, which is included by a significant bunch of files, and separates it in a library, analog to the suggestion in issue #145.
This commit is contained in:
committed by
Norman Feske
parent
35384faa7a
commit
42b7c01685
@@ -78,14 +78,15 @@ namespace Genode {
|
||||
*/
|
||||
typedef struct { } Native_utcb;
|
||||
|
||||
struct Thread_id_checker
|
||||
struct Cap_dst_policy
|
||||
{
|
||||
typedef Okl4::L4_ThreadId_t Dst;
|
||||
static bool valid(Dst tid) { return !Okl4::L4_IsNilThread(tid); }
|
||||
static Dst invalid() { return Okl4::L4_nilthread; }
|
||||
static void copy(void* dst, Native_capability_tpl<Cap_dst_policy>* src);
|
||||
};
|
||||
|
||||
typedef Native_capability_tpl<Thread_id_checker> Native_capability;
|
||||
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
|
||||
typedef Okl4::L4_ThreadId_t Native_connection_state;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
SRC_CC = ipc.cc pager.cc
|
||||
LIBS = cap_copy
|
||||
|
||||
vpath %.cc $(REP_DIR)/src/base/ipc
|
||||
|
||||
Reference in New Issue
Block a user