mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-20 08:03:56 +00: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:
@ -79,7 +79,7 @@ void Thread::_init_platform_thread(size_t weight, Type type)
|
||||
|
||||
/* for main threads the member initialization differs */
|
||||
if (type == MAIN || type == REINITIALIZED_MAIN) {
|
||||
_thread_cap = env()->parent()->main_thread_cap();
|
||||
_thread_cap = env_deprecated()->parent()->main_thread_cap();
|
||||
|
||||
native_thread().exc_pt_sel = 0;
|
||||
native_thread().ec_sel = Nova::PT_SEL_MAIN_EC;
|
||||
@ -107,10 +107,10 @@ void Thread::_init_platform_thread(size_t weight, Type type)
|
||||
|
||||
/* if no cpu session is given, use it from the environment */
|
||||
if (!_cpu_session)
|
||||
_cpu_session = env()->cpu_session();
|
||||
_cpu_session = env_deprecated()->cpu_session();
|
||||
|
||||
/* create thread at core */
|
||||
_thread_cap = _cpu_session->create_thread(env()->pd_session_cap(), name(),
|
||||
_thread_cap = _cpu_session->create_thread(env_deprecated()->pd_session_cap(), name(),
|
||||
_affinity, Weight(weight));
|
||||
if (!_thread_cap.valid())
|
||||
throw Cpu_session::Thread_creation_failed();
|
||||
|
Reference in New Issue
Block a user