xtensa: remove z_arch_get_next_switch_handle
Fold z_arch_get_next_switch_handle() into return_to(). This is not exactly an arch interface, and is simple enough to be moved into return_to(). Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
a819bfb2d5
commit
b2f20d65b3
1 changed files with 6 additions and 14 deletions
|
@ -141,22 +141,14 @@ static ALWAYS_INLINE void usage_stop(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
void *z_arch_get_next_switch_handle(struct k_thread *interrupted)
|
||||
{
|
||||
return _current_cpu->nested <= 1 ?
|
||||
z_get_next_switch_handle(interrupted) : interrupted;
|
||||
}
|
||||
#else
|
||||
void *z_arch_get_next_switch_handle(struct k_thread *interrupted)
|
||||
{
|
||||
return interrupted;
|
||||
}
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
|
||||
static inline void *return_to(void *interrupted)
|
||||
{
|
||||
return z_arch_get_next_switch_handle(interrupted);
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
return _current_cpu->nested <= 1 ?
|
||||
z_get_next_switch_handle(interrupted) : interrupted;
|
||||
#else
|
||||
return interrupted;
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
}
|
||||
|
||||
/* The wrapper code lives here instead of in the python script that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue