aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-05 10:34:09 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-05 10:34:09 +0000
commit95d85de7d5eb11653e1060168904171238a85721 (patch)
tree0eacb7664f84c1b8b4a3dffcfd2eb501e56c8f8b /os/nil/include
parent867c7c95aa67ea1f19286c3593500214101bacd9 (diff)
downloadChibiOS-95d85de7d5eb11653e1060168904171238a85721.tar.gz
ChibiOS-95d85de7d5eb11653e1060168904171238a85721.tar.bz2
ChibiOS-95d85de7d5eb11653e1060168904171238a85721.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6263 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil/include')
-rw-r--r--os/nil/include/nil.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h
index ea6839d6b..da79370d7 100644
--- a/os/nil/include/nil.h
+++ b/os/nil/include/nil.h
@@ -550,6 +550,17 @@ typedef struct {
#define chSysUnlockFromISR() port_unlock_from_isr()
/**
+ * @brief Evaluates if a reschedule is required.
+ *
+ * @retval true if there is a thread that must go in running state
+ * immediately.
+ * @retval false if preemption is not required.
+ *
+ * @iclass
+ */
+#define chSchIsRescRequiredI() ((bool)(nil.current != nil.next))
+
+/**
* @brief Delays the invoking thread for the specified number of seconds.
* @note The specified time is rounded up to a value allowed by the real
* system clock.
@@ -716,8 +727,8 @@ extern "C" {
syssts_t chSysGetStatusAndLockX(void);
void chSysRestoreStatusX(syssts_t sts);
thread_reference_t chSchReadyI(thread_reference_t trp, msg_t msg);
- msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t timeout);
void chSchRescheduleS(void);
+ msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t timeout);
msg_t chThdSuspendTimeoutS(thread_reference_t *trp, systime_t timeout);
void chThdResumeI(thread_reference_t *trp, msg_t msg);
void chThdSleep(systime_t time);