aboutsummaryrefslogtreecommitdiffstats
path: root/src/chschd.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-07 11:47:38 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-07 11:47:38 +0000
commitd785c8a7e5e58dc2ef41afdfee47e605ef1216f5 (patch)
tree332a887d2eacc9a5e836d63792f882f68b0a46fe /src/chschd.c
parent719cf5fa8d01d6660fa85708c03fcf3cdac8bf37 (diff)
downloadChibiOS-d785c8a7e5e58dc2ef41afdfee47e605ef1216f5.tar.gz
ChibiOS-d785c8a7e5e58dc2ef41afdfee47e605ef1216f5.tar.bz2
ChibiOS-d785c8a7e5e58dc2ef41afdfee47e605ef1216f5.zip
Documentation fixes about timeouts, improved checks in chVTSetI().
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@812 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chschd.c')
-rw-r--r--src/chschd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/chschd.c b/src/chschd.c
index 3c17c3831..6742bf5f8 100644
--- a/src/chschd.c
+++ b/src/chschd.c
@@ -122,10 +122,10 @@ static void wakeup(void *p) {
* to sleep is awakened after the specified time has elapsed.
*
* @param newstate the new thread state
- * @param time the number of ticks before the operation timeouts. The
- * following special values are allowed:
- * - @p TIME_ZERO immediate timeout.
- * - @p TIME_INFINITE no timeout.
+ * @param time the number of ticks before the operation timeouts,
+ * the following special values are allowed:
+ * - @a TIME_ZERO immediate timeout.
+ * - @a TIME_INFINITE no timeout.
* @return The wakeup message.
* @retval RDY_TIMEOUT if a timeout occurs.
* @note The function must be called in the system mutex zone.
@@ -133,8 +133,10 @@ static void wakeup(void *p) {
*/
msg_t chSchGoSleepTimeoutS(tstate_t newstate, systime_t time) {
- if (TIME_ZERO == time)
+ if (TIME_ZERO == time) {
+ chSchRescheduleS();
return RDY_OK;
+ }
if (TIME_INFINITE != time) {
VirtualTimer vt;