xtensa, kernel/sched: Move next switch_handle selection to the scheduler

The xtensa asm2 layer had a function to select the next switch handle
to return into following an exception.  There is no arch-specific code
there, it's just scheduler logic.  Move it to the scheduler where it
belongs.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2018-03-08 12:13:49 -08:00 committed by Anas Nashif
commit 9d367eeb0a
3 changed files with 31 additions and 25 deletions

View file

@ -541,4 +541,10 @@ static inline int _is_thread_user(void)
#endif
}
#endif /* CONFIG_USERSPACE */
/**
* Returns the switch_handle of the next thread to run following an interrupt.
*/
void *_get_next_switch_handle(void *interrupted);
#endif /* _ksched__h_ */