mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
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:
committed by
Norman Feske
parent
56586ae7b0
commit
fa377f0df5
@ -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; }
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user