Skip to content

Commit

Permalink
tracing: posix_arch: trace swap
Browse files Browse the repository at this point in the history
Moving trace points to the architecture code.

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif authored and carlescufi committed Aug 24, 2020
1 parent caa3480 commit e5e6ba2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/posix/core/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ int arch_swap(unsigned int key)
* and so forth. But we do not need to do so because we use posix
* threads => those are all nicely kept by the native OS kernel
*/
#if CONFIG_TRACING
sys_trace_thread_switched_out();
#endif
_current->callee_saved.key = key;
_current->callee_saved.retval = -EAGAIN;

Expand All @@ -47,6 +50,9 @@ int arch_swap(unsigned int key)


_current = _kernel.ready_q.cache;
#if CONFIG_TRACING
sys_trace_thread_switched_in();
#endif

/*
* Here a "real" arch would load all processor registers for the thread
Expand Down

0 comments on commit e5e6ba2

Please sign in to comment.