summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-07 14:14:09 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-07 14:14:09 -0600
commitf39ae5a8b656f320d99f391972e8b81a8c2d52fd (patch)
tree2392177927e9056e5057537cdb314b54232a4f67
parent7d9ff566350eab27203e2ab21b2212a69ceb84f0 (diff)
downloadnuttx-f39ae5a8b656f320d99f391972e8b81a8c2d52fd.tar.gz
nuttx-f39ae5a8b656f320d99f391972e8b81a8c2d52fd.tar.bz2
nuttx-f39ae5a8b656f320d99f391972e8b81a8c2d52fd.zip
Fix compler error in tickless code when round robin scheduling is enabled. Other cosmetic fixes to comments
-rw-r--r--nuttx/sched/Kconfig6
-rw-r--r--nuttx/sched/sched_unlock.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig
index 54cb698d7..7568e6f25 100644
--- a/nuttx/sched/Kconfig
+++ b/nuttx/sched/Kconfig
@@ -66,7 +66,7 @@ config SCHED_TICKLESS
defined include/nuttx/arch.h
config USEC_PER_TICK
- int "Milliseconds per system timer tick"
+ int "System timer tick period (microseconds)"
default 10000 if !SCHED_TICKLESS
default 100 if SCHED_TICKLESS
---help---
@@ -81,12 +81,12 @@ config USEC_PER_TICK
rates. Rather, it only determines the resolution of time reported
by clock_systimer() and the resolution of times that can be set for
certain delays including watchdog timers and delayed work. In this
- case there is a tradeoff: It is better to have the USEC_PER_TICK as
+ case there is a trade-off: It is better to have the USEC_PER_TICK as
low as possible for higher timing resolution. However, the the time
is currently held in 'unsigned int' on some systems, this may be
16-bits but on most contemporary systems it will be 32-bits. In
either case, smaller values of USEC_PER_TICK will reduce the range
- of values that delays that can be represented. So the tradeoff is
+ of values that delays that can be represented. So the trade-off is
between range and resolution (you could also modify the code to use
a 64-bit value if you really want both).
diff --git a/nuttx/sched/sched_unlock.c b/nuttx/sched/sched_unlock.c
index aa0fa75ee..91aa555ef 100644
--- a/nuttx/sched/sched_unlock.c
+++ b/nuttx/sched/sched_unlock.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <nuttx/clock.h>
#include <nuttx/arch.h>
#include "os_internal.h"
@@ -132,7 +133,7 @@ int sched_unlock(void)
*/
if ((rtcb->flags & TCB_FLAG_ROUND_ROBIN) != 0 &&
- rctb->timeslice == 0)
+ rtcb->timeslice == 0)
{
/* Yes.. that is the situation. But one more thing. The call
* to up_release_pending() above may have actually replaced