Skip to content

Commit

Permalink
tracing: POSIX arch: Trace switch to main thread
Browse files Browse the repository at this point in the history
Add tracing of the switch to the main thread

Relatest to zephyrproject-rtos#13357

Signed-off-by: Alberto Escolar Piedras <[email protected]>
  • Loading branch information
aescolar authored and nashif committed Feb 14, 2019
1 parent eb6534f commit 65451db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/posix/core/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ void _arch_switch_to_main_thread(struct k_thread *main_thread,
posix_thread_status_t *ready_thread_ptr =
(posix_thread_status_t *)
_kernel.ready_q.cache->callee_saved.thread_status;

z_sys_trace_thread_switched_out();

_kernel.current = _kernel.ready_q.cache;

z_sys_trace_thread_switched_in();

posix_main_thread_start(ready_thread_ptr->thread_idx);
} /* LCOV_EXCL_LINE */
#endif
Expand Down

0 comments on commit 65451db

Please sign in to comment.