mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
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:
parent
a9795c93f9
commit
fcb861689a
@ -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;
|
||||
|
@ -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; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user