summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-12 13:50:18 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-12 13:50:18 -0600
commitde88ac15376fb0d4bd844051b60035463a1f7bbc (patch)
tree653489bff5d79a8116a0e122fadedc813f4c945f
parent33da3d498b9d27edc0a6fdf9aa7f9933a8045a25 (diff)
downloadnuttx-de88ac15376fb0d4bd844051b60035463a1f7bbc.tar.gz
nuttx-de88ac15376fb0d4bd844051b60035463a1f7bbc.tar.bz2
nuttx-de88ac15376fb0d4bd844051b60035463a1f7bbc.zip
Updated comments
-rw-r--r--nuttx/sched/sched/sched_timerexpiration.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/nuttx/sched/sched/sched_timerexpiration.c b/nuttx/sched/sched/sched_timerexpiration.c
index c4eeaafbb..b7702804d 100644
--- a/nuttx/sched/sched/sched_timerexpiration.c
+++ b/nuttx/sched/sched/sched_timerexpiration.c
@@ -66,7 +66,7 @@
* that the read-to-run list is modified in order to muck with timers.
*
* The kludge/work-around is simple to keep the timer running all of the
- * time with an interval of no more than the timeslice interface. If we
+ * time with an interval of no more than the timeslice interval. If we
* this, then there is really no need to do anything when on context
* switches.
*/
@@ -684,12 +684,22 @@ void sched_timer_resume(void)
* - If the watchdog at the head of the expiration list changes (or if its
* delay changes. This can occur as a consequence of the actions of
* wd_start() or wd_cancel().
- * - Any context switch occurs, changing the task at the head of the
- * ready-to-run list. The task at the head of list may require
- * different timeslice processing (or no timeslice at all).
* - When pre-emption is re-enabled. A previous time slice may have
* expired while pre-emption was enabled and now needs to be executed.
*
+ * In the original design, it was also planned that sched_timer_reasses()
+ * be called whenever there was a change at the head of the ready-to-run
+ * list. That call was intended to establish a new time-slice for the
+ * newly activated task or to stop the timer if time-slicing is no longer
+ * needed. However, it turns out that that solution is too fragile: The
+ * system is too vulnerable at the time that the read-to-run list is
+ * modified in order to muck with timers.
+ *
+ * The kludge/work-around is simple to keep the timer running all of the
+ * time with an interval of no more than the timeslice interval. If we
+ * this, then there is really no need to do anything when on context
+ * switches.
+ *
* Input Parameters:
* None
*