base: support for re-validating session routes

This patch supplements 'Session_state' with the methods needed to test
the validity of a session with a changed routing policy.
This commit is contained in:
Norman Feske 2017-02-21 23:00:24 +01:00 committed by Christian Helmuth
parent a9795c93f9
commit fcb861689a
3 changed files with 19 additions and 1 deletions

View File

@ -468,6 +468,11 @@ class Genode::Child : protected Rpc_object<Parent>,
}
void wakeup() override { _service.wakeup(); }
bool operator == (Service const &other) const override
{
return _service == other;
}
};
Constructible<Env_service> _env_service;

View File

@ -109,6 +109,8 @@ class Genode::Service : Noncopyable
* Return the RAM session to be used for trading resources
*/
virtual Ram_session_capability ram() const { return _ram; }
virtual bool operator == (Service const &other) const { return this == &other; }
};

View File

@ -139,7 +139,8 @@ class Genode::Session_state : public Parent::Client, public Parent::Server,
error("dangling session in parent-side ID space: ", *this);
}
Service &service() { return _service; }
Service &service() { return _service; }
Service const &service() const { return _service; }
/**
* Extend amount of ram attached to the session
@ -197,6 +198,16 @@ class Genode::Session_state : public Parent::Client, public Parent::Server,
return false;
}
/**
* Return client-side label of the session request
*/
Session_label client_label() const { return label_from_args(_args.string()); }
/**
* Return label presented to the server along with the session request
*/
Session_label label() const { return _label; }
/**
* Assign owner
*