mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-02 08:42:52 +00:00
parent
9ba24c0722
commit
b1a9addeb6
@ -112,7 +112,7 @@ class Cli_monitor::Child_base : public Genode::Child_policy
|
||||
_ref_ram_cap(ref_ram_cap), _ref_ram(ref_ram),
|
||||
_ram_quota(ram_quota), _ram_limit(ram_limit),
|
||||
_entrypoint(&pd_session, ENTRYPOINT_STACK_SIZE, _label.string(), false),
|
||||
_config_policy("config", _entrypoint, &ref_ram),
|
||||
_config_policy(local_rm, "config", _entrypoint, &ref_ram),
|
||||
_yield_response_sigh_cap(yield_response_sig_cap),
|
||||
_exit_sig_cap(exit_sig_cap),
|
||||
_child(local_rm, _entrypoint, *this)
|
||||
|
@ -31,6 +31,7 @@ class Genode::Child_policy_dynamic_rom_file : public Rpc_object<Rom_session>,
|
||||
private:
|
||||
|
||||
Ram_session *_ram;
|
||||
Region_map &_rm;
|
||||
|
||||
/*
|
||||
* The ROM module may be written and consumed by different threads,
|
||||
@ -72,13 +73,37 @@ class Genode::Child_policy_dynamic_rom_file : public Rpc_object<Rom_session>,
|
||||
*
|
||||
* If 'ram' is 0, the child policy is ineffective.
|
||||
*/
|
||||
Child_policy_dynamic_rom_file(const char *module_name,
|
||||
Child_policy_dynamic_rom_file(Region_map &rm,
|
||||
char const *module_name,
|
||||
Rpc_entrypoint &ep,
|
||||
Ram_session *ram)
|
||||
:
|
||||
Service("ROM", Ram_session_capability()),
|
||||
_ram(ram),
|
||||
_fg(0, 0), _bg(0, 0),
|
||||
_ram(ram), _rm(rm),
|
||||
_fg(*_ram, _rm, 0), _bg(*_ram, _rm, 0),
|
||||
_bg_has_pending_data(false),
|
||||
_ep(ep),
|
||||
_rom_session_cap(_ep.manage(this)),
|
||||
_module_name(module_name)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* \param ram RAM session used to allocate the backing store
|
||||
* for buffering ROM module data
|
||||
*
|
||||
* \deprecated
|
||||
*
|
||||
* If 'ram' is 0, the child policy is ineffective.
|
||||
*/
|
||||
Child_policy_dynamic_rom_file(char const *module_name,
|
||||
Rpc_entrypoint &ep,
|
||||
Ram_session *ram) __attribute__((deprecated))
|
||||
:
|
||||
Service("ROM", Ram_session_capability()),
|
||||
_ram(ram), _rm(*env_deprecated()->rm_session()),
|
||||
_fg(*_ram, _rm, 0), _bg(*_ram, _rm, 0),
|
||||
_bg_has_pending_data(false),
|
||||
_ep(ep),
|
||||
_rom_session_cap(_ep.manage(this)),
|
||||
|
@ -88,7 +88,7 @@ class Genode::Slave::Policy : public Child_policy
|
||||
_label(label), _binary_name(binary_name), _ram(ram_cap),
|
||||
_binary_service(Rom_session::service_name()),
|
||||
_ram_quota(ram_quota), _parent_services(parent_services), _ep(ep),
|
||||
_config_policy("config", _ep, &_ram),
|
||||
_config_policy(rm, "config", _ep, &_ram),
|
||||
_session_requester(ep, _ram, rm)
|
||||
{
|
||||
configure("<config/>");
|
||||
|
@ -42,7 +42,7 @@ class Bomb_child : public Child_policy
|
||||
|
||||
Registry<Registered<Parent_service> > &_parent_services;
|
||||
|
||||
Child_policy_dynamic_rom_file _config_policy { "config", _ep, &_env.ram() };
|
||||
Child_policy_dynamic_rom_file _config_policy { _env.rm(), "config", _ep, &_env.ram() };
|
||||
|
||||
Child _child { _env.rm(), _ep, *this };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user