diff --git a/arch/arm/src/common/up_unblocktask.c b/arch/arm/src/common/up_unblocktask.c index 97c41618250..f907c6161f4 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 a51a5d621cf..0d7f91ca563 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 15efb7a4714..c17760b87d2 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 005e74e545e..2f242fe0fb7 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 bf3148506aa..b17fd4d4834 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 diff --git a/sched/pthread_create.c b/sched/pthread_create.c index 8247ed78ee3..058541126de 100644 --- a/sched/pthread_create.c +++ b/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/sched/sched_processtimer.c b/sched/sched_processtimer.c index 186de78d2f6..6cbca477652 100644 --- a/sched/sched_processtimer.c +++ b/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