diff --git a/src/chschd.c b/src/chschd.c index 0507f8e5c..4c3b05760 100644 --- a/src/chschd.c +++ b/src/chschd.c @@ -118,19 +118,6 @@ void chSchWakeupS(Thread *ntp, t_msg msg) { } } -/** - * If a thread with an higher priority than the current thread is in the - * ready list then it becomes running. - * @note The function must be called in the system mutex zone. - */ -void chSchRescheduleS(void) { - - if (isempty(&rlist.r_queue) || firstprio(&rlist.r_queue) <= currp->p_prio) - return; - - chSchDoRescheduleI(); -} - /** * Performs a reschedulation. It is meant to be called if * \p chSchRescRequired() evaluates to \p TRUE. @@ -147,6 +134,19 @@ void chSchDoRescheduleI(void) { chSysSwitchI(&otp->p_ctx, &currp->p_ctx); } +/** + * If a thread with an higher priority than the current thread is in the + * ready list then it becomes running. + * @note The function must be called in the system mutex zone. + */ +void chSchRescheduleS(void) { + + if (isempty(&rlist.r_queue) || firstprio(&rlist.r_queue) <= currp->p_prio) + return; + + chSchDoRescheduleI(); +} + /** * Evaluates if a reschedulation is required. * @return \p TRUE if there is a thread that should go in running state