diff --git a/kernel/base/core/los_sortlink.c b/kernel/base/core/los_sortlink.c index bca4e570..8a997e50 100644 --- a/kernel/base/core/los_sortlink.c +++ b/kernel/base/core/los_sortlink.c @@ -55,10 +55,14 @@ 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); sortLinkHeader->nodeNum++; return; + } else if (listSorted->responseTime == sortList->responseTime) { + LOS_ListAdd(head->pstNext, &sortList->sortLinkNode); + sortLinkHeader->nodeNum++; + return; } LOS_DL_LIST *prevNode = head->pstPrev;