mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Warn about the use of deprecated env() function
This patch enables warnings if one of the deprecate functions that rely in the implicit use of the global Genode::env() accessor are called. For the time being, some places within the base framework continue to rely on the global function while omitting the warning by calling 'env_deprecated' instead of 'env'. Issue #1987
This commit is contained in:
@@ -63,7 +63,7 @@ Core_env * Genode::core_env()
|
||||
}
|
||||
|
||||
|
||||
Env_deprecated * Genode::env() {
|
||||
Env_deprecated * Genode::env_deprecated() {
|
||||
return core_env(); }
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class Core_child : public Child_policy
|
||||
_core_ram_cap(core_ram_cap), _core_ram(core_ram),
|
||||
_core_cpu_cap(core_cpu_cap), _core_cpu(core_cpu),
|
||||
_ram_quota(Child::effective_ram_quota(ram_quota)),
|
||||
_child(*env()->rm_session(), _entrypoint, *this)
|
||||
_child(*env_deprecated()->rm_session(), _entrypoint, *this)
|
||||
{
|
||||
_entrypoint.activate();
|
||||
}
|
||||
@@ -250,7 +250,7 @@ int main()
|
||||
* Allocate session meta data on distinct dataspaces to enable independent
|
||||
* destruction (to enable quota trading) of session component objects.
|
||||
*/
|
||||
static Sliced_heap sliced_heap(env()->ram_session(), env()->rm_session());
|
||||
static Sliced_heap sliced_heap(env_deprecated()->ram_session(), env_deprecated()->rm_session());
|
||||
|
||||
/*
|
||||
* Factory for creating RPC capabilities within core
|
||||
@@ -303,7 +303,7 @@ int main()
|
||||
log("", ram_quota / (1024*1024), " MiB RAM assigned to init");
|
||||
|
||||
static Reconstructible<Core_child>
|
||||
init(services, *env()->ram_session(), env()->ram_session_cap(),
|
||||
init(services, *env_deprecated()->ram_session(), env_deprecated()->ram_session_cap(),
|
||||
ram_quota, core_cpu, core_cpu_cap);
|
||||
|
||||
platform()->wait_for_exit();
|
||||
|
||||
Reference in New Issue
Block a user