Make local capability interface explicit. Fix #139.

Introduce a factory-, and dereference method for local capabilities. These are
capabilities that reference objects of services, which are known to be used
protection-domain internally only. To support the new Capability class methods
a protected constructor and accessor to the local object's pointer is needed
in the platform's capability base-classes. For further discussion details please
refer issue #139.
This commit is contained in:
Stefan Kalkowski
2012-03-06 15:55:44 +01:00
committed by Norman Feske
parent 56586ae7b0
commit fa377f0df5
11 changed files with 94 additions and 17 deletions

View File

@ -108,6 +108,10 @@ namespace Genode {
long _tid; /* target thread */
long _local_name;
protected:
Native_capability(void* ptr) : _local_name((long)ptr) { }
public:
/**
@ -117,6 +121,8 @@ namespace Genode {
long local_name() const { return _local_name; }
void* local() const { return (void*)_local_name; }
bool valid() const { return _tid != 0; }