!314 fix: risc-v 低功耗下存在功能问题
Merge pull request !314 from zhushengle/list
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
#include "los_tick.h"
|
||||
#include "los_debug.h"
|
||||
#include "los_hook.h"
|
||||
#if (LOSCFG_KERNEL_PM == 1)
|
||||
#include "los_pm.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
@@ -179,7 +182,7 @@ STATIC INLINE VOID OsSchedTickReload(UINT64 nextResponseTime, UINT32 responseID,
|
||||
HalSysTickReload(nextResponseTime);
|
||||
}
|
||||
|
||||
VOID OsSchedSetNextExpireTime(UINT64 startTime, UINT32 responseID, UINT64 taskEndTime, BOOL timeUpdate)
|
||||
STATIC INLINE VOID OsSchedSetNextExpireTime(UINT64 startTime, UINT32 responseID, UINT64 taskEndTime, BOOL timeUpdate)
|
||||
{
|
||||
UINT64 nextExpireTime;
|
||||
UINT64 nextResponseTime = 0;
|
||||
@@ -216,6 +219,7 @@ VOID OsSchedSetNextExpireTime(UINT64 startTime, UINT32 responseID, UINT64 taskEn
|
||||
|
||||
VOID OsSchedUpdateExpireTime(UINT64 startTime, BOOL timeUpdate)
|
||||
{
|
||||
BOOL isPmMode = FALSE;
|
||||
UINT64 endTime;
|
||||
LosTaskCB *runTask = g_losTask.runTask;
|
||||
|
||||
@@ -223,7 +227,10 @@ VOID OsSchedUpdateExpireTime(UINT64 startTime, BOOL timeUpdate)
|
||||
return;
|
||||
}
|
||||
|
||||
if (runTask->taskID != g_idleTaskID) {
|
||||
#if (LOSCFG_KERNEL_PM == 1)
|
||||
isPmMode = OsIsPmMode();
|
||||
#endif
|
||||
if ((runTask->taskID != g_idleTaskID) && !isPmMode) {
|
||||
INT32 timeSlice = (runTask->timeSlice <= OS_TIME_SLICE_MIN) ? OS_SCHED_TIME_SLICES : runTask->timeSlice;
|
||||
endTime = startTime + timeSlice;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user