Cleanup of parent-cap handling

This patch alleviates the need for a Native_capability::Dst at the API
level. The former use case of this type as argument to
Deprecated_env::reinit uses the opaque Native_capability::Raw type
instead. The 'Raw' type contains the portion of the capability that is
transferred as-is when delegating the capability (i.e., when installing
the parent capability into a new component, or when installing a new
parent capability into a new forked Noux process). This information can
be retrieved via the new Native_capability::raw method.

Furthermore, this patch moves the functions for retriving the parent
capability to base/internal/parent_cap.h, which is meant to be
implemented in platform-specific ways. It replaces the former set of
startup/internal/_main_parent_cap.h headers.

Issue #1993
This commit is contained in:
Norman Feske
2016-06-13 15:14:32 +02:00
parent f7bdd383e2
commit d71f0a9606
29 changed files with 185 additions and 190 deletions

View File

@@ -36,13 +36,7 @@ class Genode::Native_capability
public:
struct Raw
{
Dst dst;
/* obsolete in base-hw, but still used in generic code path */
addr_t local_name;
};
struct Raw { };
/**
* Create an invalid capability
@@ -90,6 +84,8 @@ class Genode::Native_capability
_inc();
return *this;
}
Raw raw() const { return Raw(); }
};
#endif /* _INCLUDE__BASE__NATIVE_CAPABILITY_H_ */