]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/LinkedList.c
Synchronize function comment in MdePkg\Library\BaseLib.h with the instance of this...
[mirror_edk2.git] / MdePkg / Library / BaseLib / LinkedList.c
index d0d518a1e9eb8bca89c244cac616a390c2761686..ef69d1827acb2ccacdfe283b20aaf283c0fa44ef 100644 (file)
@@ -85,7 +85,7 @@ IsNodeInList (
 \r
   If ListHead is NULL, then ASSERT().\r
 \r
-  @param  List  A pointer to the head node of a new doubly linked list.\r
+  @param  ListHead  A pointer to the head node of a new doubly linked list.\r
 \r
   @return ListHead\r
 \r
@@ -113,12 +113,13 @@ InitializeListHead (
 \r
   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 ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or\r
+  InitializeListHead(), 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  List      A pointer to the head node of a doubly linked list.\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
                     of a doubly linked list.\r
 \r
@@ -153,12 +154,13 @@ InsertHeadList (
 \r
   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 ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or \r
+  InitializeListHead(), 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  List      A pointer to the head node of a doubly linked list.\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
                     doubly linked list.\r
 \r
@@ -187,12 +189,13 @@ InsertTailList (
 /**\r
   Retrieves the first node of a doubly linked list.\r
 \r
-  Returns the first node of a doubly linked list. List must have been\r
-  initialized with InitializeListHead(). If List is empty, then NULL is\r
-  returned.\r
+  Returns the first node of a doubly linked list.  List must have been \r
+  initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().\r
+  If List is empty, then List is returned.\r
 \r
   If List is NULL, then ASSERT().\r
-  If List was not initialized with InitializeListHead(), then ASSERT().\r
+  If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or \r
+  InitializeListHead(), 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
@@ -220,13 +223,14 @@ GetFirstNode (
 /**\r
   Retrieves the next node of a doubly linked list.\r
 \r
-  Returns the node of a doubly linked list that follows Node. List must have\r
-  been initialized with InitializeListHead(). If List is empty, then List is\r
-  returned.\r
+  Returns the node of a doubly linked list that follows Node.  \r
+  List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()\r
+  or InitializeListHead().  If List is empty, then List is returned.\r
 \r
   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 List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or \r
+  InitializeListHead(), then ASSERT().\r
   If PcdMaximumLinkedListLenth is not zero, and List contains more than\r
   PcdMaximumLinkedListLenth nodes, then ASSERT().\r
   If Node is not a node in List, then ASSERT().\r
@@ -260,12 +264,13 @@ GetNextNode (
   zero nodes, this function returns TRUE. Otherwise, it returns FALSE.\r
 \r
   If ListHead is NULL, then ASSERT().\r
-  If ListHead was not initialized with InitializeListHead(), then ASSERT().\r
+  If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or \r
+  InitializeListHead(), 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
+  @param  ListHead  A pointer to the head node of a doubly linked list.\r
 \r
   @retval TRUE  The linked list is empty.\r
   @retval FALSE The linked list is not empty.\r
@@ -292,11 +297,12 @@ IsListEmpty (
 \r
   Returns TRUE if Node is equal to List.  Returns FALSE if Node is one of the\r
   nodes in the doubly linked list specified by List.  List must have been\r
-  initialized with InitializeListHead().\r
+  initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().\r
 \r
   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 List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(), \r
+  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
@@ -329,11 +335,12 @@ IsNull (
 \r
   Returns TRUE if Node is the last node in the doubly linked list specified by\r
   List. Otherwise, FALSE is returned. List must have been initialized with\r
-  InitializeListHead().\r
+  INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().\r
 \r
   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 List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or\r
+  InitializeListHead(), 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
@@ -369,8 +376,8 @@ IsNodeAtEnd (
   Otherwise, the location of the FirstEntry node is swapped with the location\r
   of the SecondEntry node in a doubly linked list. SecondEntry must be in the\r
   same double linked list as FirstEntry and that double linked list must have\r
-  been initialized with InitializeListHead(). SecondEntry is returned after the\r
-  nodes are swapped.\r
+  been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(). \r
+  SecondEntry is returned after the nodes are swapped.\r
 \r
   If FirstEntry is NULL, then ASSERT().\r
   If SecondEntry is NULL, then ASSERT().\r
@@ -382,8 +389,8 @@ IsNodeAtEnd (
 \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
-  \r
-  @return SecondEntry after the nodes are swapped\r
+\r
+  @return SecondEntry.\r
 \r
 **/\r
 LIST_ENTRY *\r
@@ -449,11 +456,9 @@ SwapListEntries (
   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
+  @param  Entry A pointer to a node in a linked list.\r
 \r
-  @return The node following Entry in the doubly linked list.\r
-          If Entry is the only node in the linked list, then\r
-          the head node of the linked list is returned.\r
+  @return Entry.\r
 \r
 **/\r
 LIST_ENTRY *\r