- By searching the List, finds the location of the Node in List. At the same time,\r
- verifies the validity of this list.\r
+ If FirstEntry is NULL, then ASSERT().\r
+ If FirstEntry->ForwardLink is NULL, then ASSERT().\r
+ If FirstEntry->BackLink is NULL, then ASSERT().\r
+ If PcdMaximumLinkedListLength is not zero, and List contains more than\r
+ PcdMaximumLinkedListLength nodes, then ASSERT().\r
+ If PcdVerifyNodeInList is TRUE and SecondEntry is NULL, then ASSERT().\r
+\r
+ @param FirstEntry A pointer to a node in a linked list.\r
+ @param SecondEntry A pointer to the node to locate.\r
+ @param InList Defines whether to check if SecondEntry is or is not part\r
+ of the same doubly-linked list as FirstEntry.\r
+\r
+**/\r
+#if !defined (MDEPKG_NDEBUG)\r
+ #define ASSERT_VERIFY_NODE_IN_VALID_LIST(FirstEntry, SecondEntry, InList) \\r
+ do { \\r
+ if (FeaturePcdGet (PcdVerifyNodeInList)) { \\r
+ ASSERT (InList == IsNodeInList ((FirstEntry), (SecondEntry))); \\r
+ } else { \\r
+ ASSERT (InternalBaseLibIsListValid (FirstEntry)); \\r
+ } \\r
+ } while (FALSE)\r
+#else\r
+ #define ASSERT_VERIFY_NODE_IN_VALID_LIST(FirstEntry, SecondEntry, InList)\r
+#endif\r
+\r
+/**\r
+ Worker function that verifies the validity of this list.\r