Maintain sequence counter
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 30s
Builds / ExectOS (i686, debug) (push) Successful in 37s
Builds / ExectOS (i686, release) (push) Successful in 28s
Builds / ExectOS (amd64, release) (push) Successful in 39s

This commit is contained in:
2026-02-24 17:40:45 +01:00
parent 7e62919c6b
commit 7144242613

View File

@@ -75,10 +75,11 @@ RTL::SinglyList::InsertHeadList(IN OUT PSINGLE_LIST_HEADER ListHead,
/* Store the original first entry */ /* Store the original first entry */
OriginalEntry = ListHead->Next.Next; OriginalEntry = ListHead->Next.Next;
/* Insert entry at the head of the list and increment depth */ /* Insert entry at the head of the list and increment depth and sequence */
Entry->Next = ListHead->Next.Next; Entry->Next = ListHead->Next.Next;
ListHead->Next.Next = Entry; ListHead->Next.Next = Entry;
ListHead->Depth++; ListHead->Depth++;
ListHead->Sequence++;
/* Return original first entry */ /* Return original first entry */
return OriginalEntry; return OriginalEntry;
@@ -133,8 +134,9 @@ RTL::SinglyList::InsertTailList(IN OUT PSINGLE_LIST_HEADER ListHead,
CurrentEntry->Next = Entry; CurrentEntry->Next = Entry;
} }
/* Increment list depth */ /* Increment list depth and sequence */
ListHead->Depth++; ListHead->Depth++;
ListHead->Sequence++;
/* Return original last entry */ /* Return original last entry */
return OriginalEntry; return OriginalEntry;
@@ -283,8 +285,9 @@ RTL::SinglyList::SpliceHeadList(IN OUT PSINGLE_LIST_HEADER ListHead,
LastEntry->Next = ListHead->Next.Next; LastEntry->Next = ListHead->Next.Next;
ListHead->Next.Next = SpliceList->Next.Next; ListHead->Next.Next = SpliceList->Next.Next;
/* Update depth of the destination list */ /* Update depth and sequence of the destination list */
ListHead->Depth += SpliceList->Depth; ListHead->Depth += SpliceList->Depth;
ListHead->Sequence++;
/* Reinitialize the source list to empty */ /* Reinitialize the source list to empty */
SpliceList->Next.Next = NULLPTR; SpliceList->Next.Next = NULLPTR;
@@ -340,8 +343,9 @@ RTL::SinglyList::SpliceTailList(IN OUT PSINGLE_LIST_HEADER ListHead,
LastEntry->Next = SpliceList->Next.Next; LastEntry->Next = SpliceList->Next.Next;
} }
/* Update depth of the destination list */ /* Update depth and sequence of the destination list */
ListHead->Depth += SpliceList->Depth; ListHead->Depth += SpliceList->Depth;
ListHead->Sequence++;
/* Reinitialize the source list to empty */ /* Reinitialize the source list to empty */
SpliceList->Next.Next = NULLPTR; SpliceList->Next.Next = NULLPTR;