summaryrefslogtreecommitdiff
path: root/nuttx/arch/dm320
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-08-26 23:48:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-08-26 23:48:11 +0000
commit0f1403b34b60885db2940a8f8c317cee4bad59f2 (patch)
treef368024980a27ce62d7e1fe58385ccc3baae091f /nuttx/arch/dm320
parentf44dd91da88f5a366f9c61c6769e108e3ccc547b (diff)
downloadpx4-nuttx-0f1403b34b60885db2940a8f8c317cee4bad59f2.tar.gz
px4-nuttx-0f1403b34b60885db2940a8f8c317cee4bad59f2.tar.bz2
px4-nuttx-0f1403b34b60885db2940a8f8c317cee4bad59f2.zip
Fix timeslice calculation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@312 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/dm320')
-rw-r--r--nuttx/arch/dm320/src/up_unblocktask.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/arch/dm320/src/up_unblocktask.c b/nuttx/arch/dm320/src/up_unblocktask.c
index c17760b87..848ddd0cc 100644
--- a/nuttx/arch/dm320/src/up_unblocktask.c
+++ b/nuttx/arch/dm320/src/up_unblocktask.c
@@ -42,6 +42,7 @@
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
+#include "clock_internal.h"
#include "os_internal.h"
#include "up_internal.h"
@@ -96,11 +97,11 @@ void up_unblock_task(_TCB *tcb)
sched_removeblocked(tcb);
/* Reset its timeslice. This is only meaningful for round
- * robin tasks but it doesn't here to do it for everything
+ * robin tasks but it doesn't hurt to do it for all tasks.
*/
#if CONFIG_RR_INTERVAL > 0
- tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC;
+ tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
#endif
/* Add the task in the correct location in the prioritized