From 14a668aeb4737d86fb27a88ca13d85590d695c7c Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 20 May 2007 15:43:53 +0000 Subject: Fix timeslice calculation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@232 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/sched/pthread_create.c | 2 +- nuttx/sched/sched_processtimer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'nuttx/sched') diff --git a/nuttx/sched/pthread_create.c b/nuttx/sched/pthread_create.c index 8247ed78e..058541126 100644 --- a/nuttx/sched/pthread_create.c +++ b/nuttx/sched/pthread_create.c @@ -365,7 +365,7 @@ int pthread_create(pthread_t *thread, pthread_attr_t *attr, if (policy == SCHED_RR) { ptcb->flags |= TCB_FLAG_ROUND_ROBIN; - ptcb->timeslice = CONFIG_RR_INTERVAL; + ptcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK; } #endif diff --git a/nuttx/sched/sched_processtimer.c b/nuttx/sched/sched_processtimer.c index 186de78d2..6cbca4776 100644 --- a/nuttx/sched/sched_processtimer.c +++ b/nuttx/sched/sched_processtimer.c @@ -103,7 +103,7 @@ static void sched_process_timeslice(void) { /* Reset the timeslice in any case. */ - rtcb->timeslice = CONFIG_RR_INTERVAL; + rtcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK; /* We know we are at the head of the ready to run * prioritized list. We must be the highest priority -- cgit v1.2.3