IssueNo:#I3IK07
Description:liteos_m scheduling optimization and low power design. Sig:kernel Feature or Bugfix:Feature Binary Source:No Change-Id: I56bb190c73c8d7497ddbf2ad49ad522143008117
This commit is contained in:
parent
cd30e62998
commit
628cdcbea0
|
@ -445,6 +445,7 @@ VOID OsSchedStart(VOID)
|
||||||
g_losTask.newTask = newTask;
|
g_losTask.newTask = newTask;
|
||||||
g_losTask.runTask = g_losTask.newTask;
|
g_losTask.runTask = g_losTask.newTask;
|
||||||
|
|
||||||
|
g_taskScheduled = 1;
|
||||||
newTask->startTime = OsGetCurrSchedTimeCycle();
|
newTask->startTime = OsGetCurrSchedTimeCycle();
|
||||||
OsSchedTaskDeQueue(newTask);
|
OsSchedTaskDeQueue(newTask);
|
||||||
|
|
||||||
|
@ -453,7 +454,6 @@ VOID OsSchedStart(VOID)
|
||||||
OsSchedSetNextExpireTime(newTask->startTime, newTask->taskID, newTask->startTime + newTask->timeSlice);
|
OsSchedSetNextExpireTime(newTask->startTime, newTask->taskID, newTask->startTime + newTask->timeSlice);
|
||||||
|
|
||||||
PRINTK("Entering scheduler\n");
|
PRINTK("Entering scheduler\n");
|
||||||
g_taskScheduled = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL OsSchedTaskSwitch(VOID)
|
BOOL OsSchedTaskSwitch(VOID)
|
||||||
|
@ -501,6 +501,8 @@ VOID LOS_SchedTickHandler(VOID)
|
||||||
UINT64 currTime;
|
UINT64 currTime;
|
||||||
BOOL needSched = FALSE;
|
BOOL needSched = FALSE;
|
||||||
|
|
||||||
|
LOS_ASSERT(g_taskScheduled);
|
||||||
|
|
||||||
UINT32 intSave = LOS_IntLock();
|
UINT32 intSave = LOS_IntLock();
|
||||||
|
|
||||||
if (g_schedResponseID == OS_INVALID) {
|
if (g_schedResponseID == OS_INVALID) {
|
||||||
|
@ -512,7 +514,7 @@ VOID LOS_SchedTickHandler(VOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
g_schedResponseTime = OS_SCHED_MAX_RESPONSE_TIME;
|
g_schedResponseTime = OS_SCHED_MAX_RESPONSE_TIME;
|
||||||
if (g_taskScheduled && needSched && LOS_CHECK_SCHEDULE) {
|
if (needSched && LOS_CHECK_SCHEDULE) {
|
||||||
HalTaskSchedule();
|
HalTaskSchedule();
|
||||||
} else {
|
} else {
|
||||||
currTime = OsGetCurrSchedTimeCycle();
|
currTime = OsGetCurrSchedTimeCycle();
|
||||||
|
|
Loading…
Reference in New Issue