mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-13 04:38:20 +00:00
trace: initialize trace control in Thread::start
Previously, the trace control of a thread was initialized in its constructor (which is generic for all components). This has the disadvantage that the CPU-session-pointer member of the thread might not be valid at this point. And it cannot be replaced by using the "deprecated_env" CPU session neither as constructing the deprecated environment in causes troubles in Core. But as the trace control shouldn't be needed in Core anyway, the initialization can be moved to the Thread::start implementation of non-core components. This code already takes care of the CPU session pointer. Fixes #2901
This commit is contained in:
committed by
Christian Helmuth
parent
09bf68e8ad
commit
fbe9d26c47
@ -48,9 +48,7 @@ void Thread::_deinit_platform_thread()
|
||||
|
||||
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_deprecated()->cpu_session();
|
||||
_init_cpu_session_and_trace_control();
|
||||
|
||||
if (type == NORMAL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user