mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-13 04:38:20 +00:00
base: replace obj_by_* by lookup_and_lock
Add functionality to lookup an object and lock it. Additional the case is handled that a object may be already in-destruction and the lookup will deny returning the object. The object_pool generalize the lookup and lock functionality of the rpc_server and serve as base for following up patches to fix dangling pointer issues.
This commit is contained in:
committed by
Norman Feske
parent
ca37f26a01
commit
c2d3543e62
@ -40,6 +40,9 @@ namespace Genode {
|
||||
*/
|
||||
Thread_capability thread_cap() { return _thread_cap; } const
|
||||
void thread_cap(Thread_capability cap) { _thread_cap = cap; }
|
||||
|
||||
/* required by lookup_and_lock, provided by Object_pool::Entry normally */
|
||||
void release() { }
|
||||
};
|
||||
|
||||
class Pager_activation_base { };
|
||||
@ -47,7 +50,7 @@ namespace Genode {
|
||||
{
|
||||
Pager_entrypoint(Cap_session *, Pager_activation_base *) { }
|
||||
|
||||
Pager_object *obj_by_cap(Pager_capability) { return 0; }
|
||||
Pager_object *lookup_and_lock(Pager_capability) { return 0; }
|
||||
};
|
||||
template <int FOO> class Pager_activation : public Pager_activation_base { };
|
||||
}
|
||||
|
Reference in New Issue
Block a user