mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +00:00
noux: keep cap of last pager
This commit is contained in:
parent
df272c90ec
commit
cdf57b60f9
@ -93,6 +93,16 @@ class Noux::Rm_session_component : public Rpc_object<Rm_session>
|
|||||||
|
|
||||||
Dataspace_registry &_ds_registry;
|
Dataspace_registry &_ds_registry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remember last pager capability returned by add_client
|
||||||
|
*
|
||||||
|
* On NOVA, we need to preserve a local copy of the pager capability
|
||||||
|
* until we have passed to a call of 'Cpu_session::set_pager'.
|
||||||
|
* Otherwise, NOVA would transitively revoke the capability that we
|
||||||
|
* handed out to our child.
|
||||||
|
*/
|
||||||
|
Pager_capability _last_pager;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -329,8 +339,11 @@ class Noux::Rm_session_component : public Rpc_object<Rm_session>
|
|||||||
Pager_capability add_client(Thread_capability thread)
|
Pager_capability add_client(Thread_capability thread)
|
||||||
{
|
{
|
||||||
return retry<Rm_session::Out_of_metadata>(
|
return retry<Rm_session::Out_of_metadata>(
|
||||||
[&] () { return _rm.add_client(thread); },
|
[&] () {
|
||||||
[&] () { Genode::env()->parent()->upgrade(_rm, "ram_quota=8192"); });
|
Pager_capability cap = _rm.add_client(thread);
|
||||||
|
_last_pager = cap;
|
||||||
|
return cap;
|
||||||
|
}, [&] () { Genode::env()->parent()->upgrade(_rm, "ram_quota=8192"); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void remove_client(Pager_capability pager)
|
void remove_client(Pager_capability pager)
|
||||||
|
Loading…
Reference in New Issue
Block a user