]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/LinkedList.c
1.Updated some functions header of BaseLib with new MWG spec
[mirror_edk2.git] / MdePkg / Library / BaseLib / LinkedList.c
index be7e0a64b762557a98acc8651ea5281bd35f546d..a1a2453fdec14b00de1edaecf8e32fc4011490ca 100644 (file)
@@ -96,8 +96,9 @@ InitializeListHead (
   If ListHead is NULL, then ASSERT().\r
   If Entry is NULL, then ASSERT().\r
   If ListHead was not initialized with InitializeListHead(), then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and ListHead contains more than\r
-  PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number\r
+  of nodes in ListHead, including the ListHead node, is greater than or \r
+  equal to PcdMaximumLinkedListLength, then ASSERT().\r
 \r
   @param  ListHead  A pointer to the head node of a doubly linked list.\r
   @param  Entry     A pointer to a node that is to be inserted at the beginning\r
@@ -135,8 +136,9 @@ InsertHeadList (
   If ListHead is NULL, then ASSERT().\r
   If Entry is NULL, then ASSERT().\r
   If ListHead was not initialized with InitializeListHead(), then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and ListHead contains more than\r
-  PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number\r
+  of nodes in ListHead, including the ListHead node, is greater than or \r
+  equal to PcdMaximumLinkedListLength, then ASSERT().\r
 \r
   @param  ListHead  A pointer to the head node of a doubly linked list.\r
   @param  Entry     A pointer to a node that is to be added at the end of the\r
@@ -173,8 +175,9 @@ InsertTailList (
 \r
   If List is NULL, then ASSERT().\r
   If List was not initialized with InitializeListHead(), then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and List contains more than\r
-  PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLenth is not zero, and the number of nodes \r
+  in List, including the List node, is greater than or equal to \r
+  PcdMaximumLinkedListLength, then ASSERT().\r
 \r
   @param  List  A pointer to the head node of a doubly linked list.\r
 \r
@@ -240,8 +243,9 @@ GetNextNode (
 \r
   If ListHead is NULL, then ASSERT().\r
   If ListHead was not initialized with InitializeListHead(), then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and List contains more than\r
-  PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLenth is not zero, and the number of nodes \r
+  in List, including the List node, is greater than or equal to \r
+  PcdMaximumLinkedListLength, then ASSERT().\r
 \r
   @param  ListHead  A pointer to the head node of a doubly linked list.\r
 \r
@@ -273,12 +277,13 @@ IsListEmpty (
   If List is NULL, then ASSERT().\r
   If Node is NULL, then ASSERT().\r
   If List was not initialized with InitializeListHead(), then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and List contains more than\r
-  PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLenth is not zero, and the number of nodes \r
+  in List, including the List node, is greater than or equal to \r
+  PcdMaximumLinkedListLength, then ASSERT().\r
   If Node is not a node in List and Node is not equal to List, then ASSERT().\r
 \r
   @param  List  A pointer to the head node of a doubly linked list.\r
-  @param  Node A pointer to a node in the doubly linked list.\r
+  @param  Node  A pointer to a node in the doubly linked list.\r
 \r
   @retval TRUE  Node is one of the nodes in the doubly linked list.\r
   @retval FALSE Node is not one of the nodes in the doubly linked list.\r
@@ -309,12 +314,13 @@ IsNull (
   If List is NULL, then ASSERT().\r
   If Node is NULL, then ASSERT().\r
   If List was not initialized with InitializeListHead(), then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and List contains more than\r
-  PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLenth is not zero, and the number of nodes \r
+  in List, including the List node, is greater than or equal to \r
+  PcdMaximumLinkedListLength, then ASSERT().\r
   If Node is not a node in List, then ASSERT().\r
 \r
   @param  List  A pointer to the head node of a doubly linked list.\r
-  @param  Node A pointer to a node in the doubly linked list.\r
+  @param  Node  A pointer to a node in the doubly linked list.\r
 \r
   @retval TRUE  Node is the last node in the linked list.\r
   @retval FALSE Node is not the last node in the linked list.\r
@@ -349,9 +355,10 @@ IsNodeAtEnd (
   If FirstEntry is NULL, then ASSERT().\r
   If SecondEntry is NULL, then ASSERT().\r
   If SecondEntry and FirstEntry are not in the same linked list, then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and the linked list containing\r
-  FirstEntry and SecondEntry contains more than PcdMaximumLinkedListLenth\r
-  nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLength is not zero, and the number of nodes in the\r
+  linked list containing the FirstEntry and SecondEntry nodes, including\r
+  the FirstEntry and SecondEntry nodes, is greater than or equal to \r
+  PcdMaximumLinkedListLength, then ASSERT().\r
 \r
   @param  FirstEntry  A pointer to a node in a linked list.\r
   @param  SecondEntry A pointer to another node in the same linked list.\r
@@ -416,8 +423,9 @@ SwapListEntries (
 \r
   If Entry is NULL, then ASSERT().\r
   If Entry is the head node of an empty list, then ASSERT().\r
-  If PcdMaximumLinkedListLenth is not zero, and the linked list containing\r
-  Entry contains more than PcdMaximumLinkedListLenth nodes, then ASSERT().\r
+  If PcdMaximumLinkedListLength is not zero, and the number of nodes in the \r
+  linked list containing Entry, including the Entry node, is greater than \r
+  or equal to PcdMaximumLinkedListLength, then ASSERT().\r
 \r
   @param  Entry A pointer to a node in a linked list\r
 \r