Add 'socket' member to 'Native_capability::Dst'

In the final version, the 'socket' will be the only member to remain in
the 'Dst' time. In the transition phase, we store both the old 'tid' and
the 'socket'.
This commit is contained in:
Norman Feske
2012-07-18 14:07:13 +02:00
parent c09cd2d1a7
commit 1c3b9a6f68
5 changed files with 25 additions and 11 deletions

View File

@ -56,7 +56,7 @@ namespace Genode {
static IF *deref(Capability<IF> cap)
{
/* check if this is a pseudo capability */
if (cap.dst() != 0 || !cap.local_name())
if (cap.dst().tid != 0 || !cap.local_name())
throw Non_local_capability();
/*
@ -81,7 +81,8 @@ namespace Genode {
template <typename IF>
static Capability<IF> capability(IF *interface)
{
return reinterpret_cap_cast<IF>(Native_capability(0, (long)interface));
typedef Native_capability::Dst Dst;
return reinterpret_cap_cast<IF>(Native_capability(Dst(), (long)interface));
};
};
}