mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
Fix timeslice calculation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@311 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
|
#include "clock_internal.h"
|
||||||
#include "os_internal.h"
|
#include "os_internal.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
@@ -97,11 +98,11 @@ void up_unblock_task(_TCB *tcb)
|
|||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* 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
|
#if CONFIG_RR_INTERVAL > 0
|
||||||
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_SEC;
|
tcb->timeslice = CONFIG_RR_INTERVAL / MSEC_PER_TICK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
|
|||||||
Reference in New Issue
Block a user