mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 07:38:28 +00:00
base: pass 'Platform &' to 'bootstrap_component'
This eliminates the need of component.cc to pull the platform resources out of thin air (calling 'env_deprecated()'). Issue #4784
This commit is contained in:
@ -178,16 +178,12 @@ Capability<Parent> Platform::_obtain_parent_cap()
|
||||
|
||||
void Genode::init_parent_resource_requests(Genode::Env & env)
|
||||
{
|
||||
/**
|
||||
* Catch up asynchronous resource request and notification
|
||||
* mechanism construction of the expanding parent environment
|
||||
*/
|
||||
using Parent = Expanding_parent_client;
|
||||
static_cast<Parent*>(&env.parent())->init_fallback_signal_handling();
|
||||
}
|
||||
|
||||
|
||||
void Genode::init_platform()
|
||||
Platform &Genode::init_platform()
|
||||
{
|
||||
static Genode::Platform platform;
|
||||
|
||||
@ -197,8 +193,12 @@ void Genode::init_platform()
|
||||
init_thread(platform.cpu, platform.rm);
|
||||
init_thread_start(platform.pd.rpc_cap());
|
||||
init_thread_bootstrap(platform.cpu, platform.parent.main_thread_cap());
|
||||
init_exception_handling(platform.pd, platform.rm);
|
||||
init_signal_receiver(platform.pd, platform.parent);
|
||||
|
||||
_platform_ptr = &platform;
|
||||
|
||||
return platform;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user