diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-28 08:56:04 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-12-28 08:56:04 +0000 |
commit | 978c2e800258dca15c30905c6bf1c6b0b7d772a0 (patch) | |
tree | 667a554e5a0a8b16b919bb765b554e452231f78f /os/ports/GCC/ARMCMx/chcore.h | |
parent | 9faabcc2d2b866d40b3876853683d45fe2a202e7 (diff) | |
download | ChibiOS-978c2e800258dca15c30905c6bf1c6b0b7d772a0.tar.gz ChibiOS-978c2e800258dca15c30905c6bf1c6b0b7d772a0.tar.bz2 ChibiOS-978c2e800258dca15c30905c6bf1c6b0b7d772a0.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3668 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/ARMCMx/chcore.h')
-rw-r--r-- | os/ports/GCC/ARMCMx/chcore.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/os/ports/GCC/ARMCMx/chcore.h b/os/ports/GCC/ARMCMx/chcore.h index 15cf9ac96..f8e34779f 100644 --- a/os/ports/GCC/ARMCMx/chcore.h +++ b/os/ports/GCC/ARMCMx/chcore.h @@ -205,6 +205,24 @@ struct intctx {}; #endif /* defined(__DOXYGEN__) */
+
+/**
+ * @brief Excludes the default @p chSchIsPreemptionRequired()implementation.
+ */
+#define PORT_OPTIMIZED_ISPREEMPTIONREQUIRED
+
+#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
+/**
+ * @brief Inlineable version of this kernel function.
+ */
+#define chSchIsPreemptionRequired() \
+ (rlist.r_preempt ? 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)
+#endif /* CH_TIME_QUANTUM == 0 */
+
#endif /* _FROM_ASM_ */
#endif /* _CHCORE_H_ */
|