aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/RVCT/ARMCMx/chcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/RVCT/ARMCMx/chcore.h')
-rw-r--r--os/ports/RVCT/ARMCMx/chcore.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/os/ports/RVCT/ARMCMx/chcore.h b/os/ports/RVCT/ARMCMx/chcore.h
index 950cc571f..ef3bc623c 100644
--- a/os/ports/RVCT/ARMCMx/chcore.h
+++ b/os/ports/RVCT/ARMCMx/chcore.h
@@ -87,6 +87,12 @@
(((n) >= 0) && ((n) < CORTEX_PRIORITY_LEVELS))
/**
+ * @brief Priority level verification macro.
+ */
+#define CORTEX_IS_VALID_KERNEL_PRIORITY(n) \
+ (((n) >= CORTEX_MAX_KERNEL_PRIORITY) && ((n) < CORTEX_PRIORITY_LEVELS))
+
+/**
* @brief Priority level to priority mask conversion macro.
*/
#define CORTEX_PRIORITY_MASK(n) \
@@ -169,7 +175,7 @@ struct intctx {};
*/
#define chSchIsPreemptionRequired() \
(currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
- firstprio(&rlist.r_queue) >= currp->p_prio)
+ firstprio(&rlist.r_queue) >= currp->p_prio)
#else /* CH_TIME_QUANTUM == 0 */
#define chSchIsPreemptionRequired() \
(firstprio(&rlist.r_queue) > currp->p_prio)