From b157bb76a15af60e5f312b91bda03a7b66a84885 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 20 May 2007 15:43:53 +0000 Subject: [PATCH] Fix timeslice calculation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@232 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/common/up_unblocktask.c | 2 +- arch/c5471/src/up_unblocktask.c | 2 +- arch/dm320/src/up_unblocktask.c | 2 +- arch/pjrc-8051/src/up_unblocktask.c | 2 +- arch/sim/src/up_unblocktask.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/common/up_unblocktask.c b/arch/arm/src/common/up_unblocktask.c index 97c4161825..f907c6161f 100644 --- a/arch/arm/src/common/up_unblocktask.c +++ b/arch/arm/src/common/up_unblocktask.c @@ -101,7 +101,7 @@ void up_unblock_task(_TCB *tcb) */ #if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = CONFIG_RR_INTERVAL; + tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC; #endif /* Add the task in the correct location in the prioritized diff --git a/arch/c5471/src/up_unblocktask.c b/arch/c5471/src/up_unblocktask.c index a51a5d621c..0d7f91ca56 100644 --- a/arch/c5471/src/up_unblocktask.c +++ b/arch/c5471/src/up_unblocktask.c @@ -101,7 +101,7 @@ void up_unblock_task(_TCB *tcb) */ #if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = CONFIG_RR_INTERVAL; + tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC; #endif /* Add the task in the correct location in the prioritized diff --git a/arch/dm320/src/up_unblocktask.c b/arch/dm320/src/up_unblocktask.c index 15efb7a471..c17760b87d 100644 --- a/arch/dm320/src/up_unblocktask.c +++ b/arch/dm320/src/up_unblocktask.c @@ -100,7 +100,7 @@ void up_unblock_task(_TCB *tcb) */ #if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = CONFIG_RR_INTERVAL; + tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC; #endif /* Add the task in the correct location in the prioritized diff --git a/arch/pjrc-8051/src/up_unblocktask.c b/arch/pjrc-8051/src/up_unblocktask.c index 005e74e545..2f242fe0fb 100644 --- a/arch/pjrc-8051/src/up_unblocktask.c +++ b/arch/pjrc-8051/src/up_unblocktask.c @@ -101,7 +101,7 @@ void up_unblock_task(FAR _TCB *tcb) */ #if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = CONFIG_RR_INTERVAL; + tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC; #endif /* Add the task in the correct location in the prioritized diff --git a/arch/sim/src/up_unblocktask.c b/arch/sim/src/up_unblocktask.c index bf3148506a..b17fd4d483 100644 --- a/arch/sim/src/up_unblocktask.c +++ b/arch/sim/src/up_unblocktask.c @@ -100,7 +100,7 @@ void up_unblock_task(_TCB *tcb) */ #if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = CONFIG_RR_INTERVAL; + tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC; #endif /* Add the task in the correct location in the prioritized