Compare commits
4 Commits
OpenHarmon
...
OpenHarmon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6997bcf648 | ||
|
|
b65216740a | ||
|
|
2d8e86ede0 | ||
|
|
f750154f44 |
@@ -76,6 +76,7 @@ LITE_OS_SEC_TEXT_MINOR VOID ArchSysExit(VOID)
|
||||
LITE_OS_SEC_TEXT_INIT VOID *ArchTskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack)
|
||||
{
|
||||
TaskContext *context = (TaskContext *)((UINTPTR)topStack + stackSize - sizeof(TaskContext));
|
||||
LosTaskCB *taskCB = OS_TCB_FROM_TID(taskID);
|
||||
|
||||
context->r0 = taskID;
|
||||
context->r1 = 0x01010101L;
|
||||
|
||||
@@ -101,7 +101,7 @@ STATIC VOID OsPmTickTimerStart(LosPmCB *pm)
|
||||
}
|
||||
|
||||
#if (LOSCFG_BASE_CORE_TICK_WTIMER == 0)
|
||||
if (tickTimer->timerStop != NULL) {
|
||||
if ((tickTimer->timerStop != NULL) && (pm->enterSleepTime != 0)) {
|
||||
/* Restore the main CPU frequency */
|
||||
sleepTime = tickTimer->timerCycleGet();
|
||||
tickTimer->timerStop();
|
||||
@@ -123,8 +123,9 @@ STATIC VOID OsPmTickTimerStart(LosPmCB *pm)
|
||||
STATIC BOOL OsPmTickTimerStop(LosPmCB *pm)
|
||||
{
|
||||
#if (LOSCFG_BASE_CORE_TICK_WTIMER == 0)
|
||||
UINT64 sleepCycle;
|
||||
UINT64 realSleepTime = OsSchedGetNextExpireTime(OsGetCurrSchedTimeCycle());
|
||||
UINT64 sleepCycle, realSleepTime;
|
||||
UINT64 currTime = OsGetCurrSchedTimeCycle();
|
||||
UINT64 expireTime = OsSchedGetNextExpireTime(currTime);
|
||||
#endif
|
||||
LosPmTickTimer *tickTimer = pm->tickTimer;
|
||||
|
||||
@@ -134,10 +135,9 @@ STATIC BOOL OsPmTickTimerStop(LosPmCB *pm)
|
||||
|
||||
#if (LOSCFG_BASE_CORE_TICK_WTIMER == 0)
|
||||
if (tickTimer->timerStart != NULL) {
|
||||
if (realSleepTime == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
LOS_ASSERT(expireTime > currTime);
|
||||
|
||||
realSleepTime = expireTime - currTime;
|
||||
sleepCycle = OS_SYS_CYCLE_TO_NS(realSleepTime, g_sysClock);
|
||||
sleepCycle = OS_SYS_NS_TO_CYCLE(sleepCycle, tickTimer->freq);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user