7ec1fb632b
The thread switching hooks are invoked in the middle of thread switching, after the out-going thread registers are saved, but before the in-coming thread registers are restored, and also before z_thread_entry is called if the thread is just starting. When the core is first starting, the TLS base register won't be set at all, so accessing variables will fault. When switching threads, the in-coming thread TLS base register will not have been restored, so the z_tls_current value will end up getting the out-going thread instead. To fix this, switch from k_current_get() to z_current_get(). Signed-off-by: Keith Packard <keithp@keithp.com> |
||
---|---|---|
.. | ||
ctf | ||
include | ||
sysview | ||
test | ||
user | ||
CMakeLists.txt | ||
Kconfig | ||
tracing_backend_posix.c | ||
tracing_backend_ram.c | ||
tracing_backend_uart.c | ||
tracing_backend_usb.c | ||
tracing_buffer.c | ||
tracing_core.c | ||
tracing_format_async.c | ||
tracing_format_common.c | ||
tracing_format_sync.c | ||
tracing_none.c | ||
tracing_tracking.c |