diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/kernel/include/chschd.h | 15 | ||||
-rw-r--r-- | os/kernel/include/chsys.h | 2 | ||||
-rw-r--r-- | os/kernel/src/chschd.c | 18 | ||||
-rw-r--r-- | os/ports/GCC/ARM7/chcoreasm.s | 8 | ||||
-rw-r--r-- | os/ports/GCC/PPC/SPC56x/ivor.s | 2 |
5 files changed, 29 insertions, 16 deletions
diff --git a/os/kernel/include/chschd.h b/os/kernel/include/chschd.h index b8406722b..d1b69cad5 100644 --- a/os/kernel/include/chschd.h +++ b/os/kernel/include/chschd.h @@ -105,14 +105,27 @@ register Thread *currp asm(CH_CURRP_REGISTER_CACHE); extern "C" {
#endif
void scheduler_init(void);
+#if !defined(PORT_OPTIMIZED_READYI)
Thread *chSchReadyI(Thread *tp);
+#endif
+#if !defined(PORT_OPTIMIZED_GOSLEEPS)
void chSchGoSleepS(tstate_t newstate);
+#endif
+#if !defined(PORT_OPTIMIZED_GOSLEEPTIMEOUTS)
msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time);
+#endif
+#if !defined(PORT_OPTIMIZED_WAKEUPS)
void chSchWakeupS(Thread *tp, msg_t msg);
+#endif
+#if !defined(PORT_OPTIMIZED_DORESCHEDULEI)
void chSchDoRescheduleI(void);
+#endif
+#if !defined(PORT_OPTIMIZED_RESCHEDULES)
void chSchRescheduleS(void);
+#endif
+#if !defined(PORT_OPTIMIZED_ISRESCHREQUIREDEXI)
bool_t chSchIsRescRequiredExI(void);
- void chSchDoYieldS(void);
+#endif
#ifdef __cplusplus
}
#endif
diff --git a/os/kernel/include/chsys.h b/os/kernel/include/chsys.h index 0a2fa67ad..5c773136f 100644 --- a/os/kernel/include/chsys.h +++ b/os/kernel/include/chsys.h @@ -148,7 +148,7 @@ /**
* @brief IRQ handler exit code.
* @note Usually IRQ handlers function are also declared naked.
- * @note This macro usually performs the final reschedulation by using
+ * @note This macro usually performs the final reschedule by using
* @p chSchRescRequiredI() and @p chSchDoRescheduleI().
*/
#define CH_IRQ_EPILOGUE() PORT_IRQ_EPILOGUE()
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c index 9bf34d43a..ac69c6661 100644 --- a/os/kernel/src/chschd.c +++ b/os/kernel/src/chschd.c @@ -105,23 +105,21 @@ void chSchGoSleepS(tstate_t newstate) { }
#endif /* !defined(PORT_OPTIMIZED_GOSLEEPS) */
+#if !defined(PORT_OPTIMIZED_GOSLEEPTIMEOUTS) || defined(__DOXYGEN__)
/*
* Timeout wakeup callback.
*/
static void wakeup(void *p) {
Thread *tp = (Thread *)p;
-#if CH_USE_SEMAPHORES || CH_USE_MUTEXES || CH_USE_CONDVARS
+#if CH_USE_SEMAPHORES || (CH_USE_CONDVARS && CH_USE_CONDVARS_TIMEOUT)
switch (tp->p_state) {
#if CH_USE_SEMAPHORES
case THD_STATE_WTSEM:
chSemFastSignalI((Semaphore *)tp->p_u.wtobjp);
/* Falls into, intentional. */
#endif
-#if CH_USE_MUTEXES
- case THD_STATE_WTMTX:
-#endif
-#if CH_USE_CONDVARS
+#if CH_USE_CONDVARS && CH_USE_CONDVARS_TIMEOUT
case THD_STATE_WTCOND:
#endif
/* States requiring dequeuing.*/
@@ -166,6 +164,7 @@ msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time) { chSchGoSleepS(newstate);
return currp->p_u.rdymsg;
}
+#endif /* !defined(PORT_OPTIMIZED_GOSLEEPTIMEOUTS) */
/**
* @brief Wakes up a thread.
@@ -191,8 +190,7 @@ void chSchWakeupS(Thread *ntp, msg_t msg) { if (ntp->p_prio <= currp->p_prio)
chSchReadyI(ntp);
else {
- Thread *otp = currp;
- chSchReadyI(otp);
+ Thread *otp = chSchReadyI(currp);
#if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM;
#endif
@@ -225,7 +223,7 @@ void chSchDoRescheduleI(void) { #endif /* !defined(PORT_OPTIMIZED_DORESCHEDULEI) */
/**
- * @brief Performs a reschedulation if a higher priority thread is runnable.
+ * @brief Performs a reschedule if a higher priority thread is runnable.
* @details If a thread with a higher priority than the current thread is in
* the ready list then make the higher priority thread running.
*/
@@ -238,14 +236,14 @@ void chSchRescheduleS(void) { #endif /* !defined(PORT_OPTIMIZED_RESCHEDULES) */
/**
- * @brief Evaluates if a reschedulation is required.
+ * @brief Evaluates if a reschedule is required.
* @details The decision is taken by comparing the relative priorities and
* depending on the state of the round robin timeout counter.
* @note This function is meant to be used in the timer interrupt handler
* where @p chVTDoTickI() is invoked.
*
* @retval TRUE if there is a thread that should go in running state.
- * @retval FALSE if a reschedulation is not required.
+ * @retval FALSE if a reschedule is not required.
*/
#if !defined(PORT_OPTIMIZED_ISRESCHREQUIREDEXI) || defined(__DOXYGEN__)
bool_t chSchIsRescRequiredExI(void) {
diff --git a/os/ports/GCC/ARM7/chcoreasm.s b/os/ports/GCC/ARM7/chcoreasm.s index 8726d0c28..098faf180 100644 --- a/os/ports/GCC/ARM7/chcoreasm.s +++ b/os/ports/GCC/ARM7/chcoreasm.s @@ -23,9 +23,10 @@ * @addtogroup ARM7_CORE
* @{
*/
-/** @cond never */
-#include <chconf.h>
+#include "chconf.h"
+
+#if !defined(__DOXYGEN__)
.set MODE_USR, 0x10
.set MODE_FIQ, 0x11
@@ -230,5 +231,6 @@ jmpr4: bx r4
#endif /* !THUMB_NO_INTERWORKING */
-/** @endcond */
+#endif /* !defined(__DOXYGEN__) */
+
/** @} */
diff --git a/os/ports/GCC/PPC/SPC56x/ivor.s b/os/ports/GCC/PPC/SPC56x/ivor.s index 0f4c85cf3..534e4b0d5 100644 --- a/os/ports/GCC/PPC/SPC56x/ivor.s +++ b/os/ports/GCC/PPC/SPC56x/ivor.s @@ -136,7 +136,7 @@ IVOR4: ori %r3, %r3, INTC_EOIR@l
stw %r3, 0(%r3) /* Writing any value should do. */
- /* Verifies if a reschedulation is required.*/
+ /* Verifies if a reschedule is required.*/
bl chSchIsRescRequiredExI
cmpli cr0, %r3, 0
beq cr0, .ctxrestore
|