tracing: posix_arch: trace swap

Moving trace points to the architecture code.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-08-04 18:15:09 -04:00 committed by Carles Cufí
commit e5e6ba240d

View file

@ -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 * 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 * 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.key = key;
_current->callee_saved.retval = -EAGAIN; _current->callee_saved.retval = -EAGAIN;
@ -47,6 +50,9 @@ int arch_swap(unsigned int key)
_current = _kernel.ready_q.cache; _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 * Here a "real" arch would load all processor registers for the thread