- If List is NULL, then ASSERT().\r
- If Node is NULL, 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
- 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
-\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
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-IsNodeAtEnd (\r
- IN CONST LIST_ENTRY *List,\r
- IN CONST LIST_ENTRY *Node\r
- );\r
-\r
-\r
-/**\r
- Swaps the location of two nodes in a doubly linked list, and returns the\r
- first node after the swap.\r
-\r
- If FirstEntry is identical to SecondEntry, then SecondEntry is returned.\r
- 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 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
- If SecondEntry and FirstEntry are not in the same linked list, 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
- \r
- @return SecondEntry.\r
-\r
-**/\r
-LIST_ENTRY *\r
-EFIAPI\r
-SwapListEntries (\r
- IN OUT LIST_ENTRY *FirstEntry,\r
- IN OUT LIST_ENTRY *SecondEntry\r
- );\r
-\r
-\r
-/**\r
- Removes a node from a doubly linked list, and returns the node that follows\r
- the removed node.\r
-\r
- Removes the node Entry from a doubly linked list. It is up to the caller of\r
- this function to release the memory used by this node if that is required. On\r
- exit, the node following Entry in the doubly linked list is returned. If\r
- Entry is the only node in the linked list, then the head node of the linked\r
- list is returned.\r
-\r
- If Entry is NULL, then ASSERT().\r
- If Entry is the head node of an empty list, 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
- @return Entry.\r
-\r
-**/\r
-LIST_ENTRY *\r
-EFIAPI\r
-RemoveEntryList (\r
- IN CONST LIST_ENTRY *Entry\r
- );\r
-\r
-//\r
-// Math Services\r
-//\r
-\r
-/**\r
- Shifts a 64-bit integer left between 0 and 63 bits. The low bits are filled\r
- with zeros. The shifted value is returned.\r
-\r
- This function shifts the 64-bit value Operand to the left by Count bits. The\r
- low Count bits are set to zero. The shifted value is returned.\r
-\r
- If Count is greater than 63, then ASSERT().\r
-\r
- @param Operand The 64-bit operand to shift left.\r
- @param Count The number of bits to shift left.\r
-\r
- @return Operand << Count.\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-LShiftU64 (\r
- IN UINT64 Operand,\r
- IN UINTN Count\r
- );\r
-\r
-\r
-/**\r
- Shifts a 64-bit integer right between 0 and 63 bits. This high bits are\r
- filled with zeros. The shifted value is returned.\r
-\r
- This function shifts the 64-bit value Operand to the right by Count bits. The\r
- high Count bits are set to zero. The shifted value is returned.\r
-\r
- If Count is greater than 63, then ASSERT().\r
-\r
- @param Operand The 64-bit operand to shift right.\r
- @param Count The number of bits to shift right.\r
-\r
- @return Operand >> Count\r
-\r
-**/\r
-UINT64\r
-EFIAPI\r
-RShiftU64 (\r
- IN UINT64 Operand,\r
- IN UINTN Count\r
- );\r
-\r
-\r
-/**\r
- Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled\r
- with original integer's bit 63. The shifted value is returned.\r