Skip to content

Commit 65451db

Browse files
aescolarnashif
authored andcommitted
tracing: POSIX arch: Trace switch to main thread
Add tracing of the switch to the main thread Relatest to #13357 Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent eb6534f commit 65451db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/posix/core/swap.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,13 @@ void _arch_switch_to_main_thread(struct k_thread *main_thread,
9393
posix_thread_status_t *ready_thread_ptr =
9494
(posix_thread_status_t *)
9595
_kernel.ready_q.cache->callee_saved.thread_status;
96+
97+
z_sys_trace_thread_switched_out();
98+
9699
_kernel.current = _kernel.ready_q.cache;
97100

101+
z_sys_trace_thread_switched_in();
102+
98103
posix_main_thread_start(ready_thread_ptr->thread_idx);
99104
} /* LCOV_EXCL_LINE */
100105
#endif

0 commit comments

Comments
 (0)