kernel: Refactor, unifying _pend_current_thread() + _Swap() idiom
Everywhere the current thread is pended, the code is going to have to do a _Swap() soon afterward, yet the scheduler API exposed these as separate steps. Unify this pattern everywhere it appears, which saves some code bytes and gets _Swap() out of the general scheduler API at zero cost. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
8606fabf74
commit
e0a572beeb
15 changed files with 28 additions and 45 deletions
|
@ -26,7 +26,7 @@ extern int _reschedule_yield(int key);
|
|||
extern void k_sched_unlock(void);
|
||||
extern void _pend_thread(struct k_thread *thread,
|
||||
_wait_q_t *wait_q, s32_t timeout);
|
||||
extern void _pend_current_thread(_wait_q_t *wait_q, s32_t timeout);
|
||||
extern int _pend_current_thread(int key, _wait_q_t *wait_q, s32_t timeout);
|
||||
extern void _move_thread_to_end_of_prio_q(struct k_thread *thread);
|
||||
extern int _is_thread_time_slicing(struct k_thread *thread);
|
||||
extern void _update_time_slice_before_swap(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue