kernel: Further unify _reschedule APIs
Now that other work has eliminated the two cases where we had to do a reschedule "but yield even if we are cooperative", we can squash both down to a single _reschedule() function which does almost exactly what legacy _Swap() did, but wrapped as a proper scheduler API. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
0447a73f6c
commit
15cb5d7293
16 changed files with 27 additions and 38 deletions
|
@ -218,7 +218,7 @@ static void mbox_message_dispose(struct k_mbox_msg *rx_msg)
|
|||
_set_thread_return_value(sending_thread, 0);
|
||||
_mark_thread_as_not_pending(sending_thread);
|
||||
_ready_thread(sending_thread);
|
||||
_reschedule_noyield(key);
|
||||
_reschedule(key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -275,7 +275,7 @@ static int mbox_message_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg,
|
|||
* until the receiver consumes the message
|
||||
*/
|
||||
if (sending_thread->base.thread_state & _THREAD_DUMMY) {
|
||||
_reschedule_noyield(key);
|
||||
_reschedule(key);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue