fix:The SWTMR_ALIGN timer calculates the count error for the same period, and for the same response time, the later-inserted node should be behind the existing node.
Close #I3PS5B Change-Id: I15317e64ea3376a4880e8eb0a3af3e3e8449ba08
This commit is contained in:
parent
1f725147f3
commit
5cda1e77cc
|
@ -58,9 +58,12 @@ STATIC INLINE VOID OsAddNode2SortLink(SortLinkAttribute *sortLinkHeader, SortLin
|
|||
}
|
||||
|
||||
SortLinkList *listSorted = LOS_DL_LIST_ENTRY(head->pstNext, SortLinkList, sortLinkNode);
|
||||
if (listSorted->responseTime >= sortList->responseTime) {
|
||||
if (listSorted->responseTime > sortList->responseTime) {
|
||||
LOS_ListAdd(head, &sortList->sortLinkNode);
|
||||
return;
|
||||
} else if (listSorted->responseTime == sortList->responseTime) {
|
||||
LOS_ListAdd(head->pstNext, &sortList->sortLinkNode);
|
||||
return;
|
||||
}
|
||||
|
||||
LOS_DL_LIST *prevNode = head->pstPrev;
|
||||
|
|
|
@ -158,7 +158,7 @@ VOID OsSwtmrFindAlignPos(UINT64 currTime, SWTMR_CTRL_S *swtmr)
|
|||
}
|
||||
/* find same interval timer, directly return */
|
||||
if (cur->uwInterval == swtmr->uwInterval) {
|
||||
swtmr->uwCount = 0;
|
||||
swtmr->uwCount = OsSortLinkGetTargetExpireTime(currTime, &cur->stSortList);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue