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:
Alexander Boettcher
2012-12-14 10:03:55 +01:00
committed by Norman Feske
parent ca37f26a01
commit c2d3543e62
51 changed files with 374 additions and 317 deletions

View File

@ -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 { };
}