Lines Matching refs:Item
1228 NET_MAP_ITEM *Item;
1235 Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
1237 RemoveEntryList (&Item->Link);
1240 gBS->FreePool (Item);
1246 Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
1248 RemoveEntryList (&Item->Link);
1249 gBS->FreePool (Item);
1299 Return one allocated item.
1304 the fist node entry of the Recycled doubly linked list and return the corresponding item.
1308 @param[in, out] Map The netmap to allocate item for.
1310 @return The allocated item. If NULL, the
1319 NET_MAP_ITEM *Item;
1329 Item = AllocatePool (sizeof (NET_MAP_ITEM));
1331 if (Item == NULL) {
1339 InsertHeadList (Head, &Item->Link);
1343 Item = NET_LIST_HEAD (Head, NET_MAP_ITEM, Link);
1346 return Item;
1351 Allocate an item to save the <Key, Value> pair to the head of the netmap.
1353 Allocate an item to save the <Key, Value> pair and add corresponding node entry
1363 @retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the item.
1364 @retval EFI_SUCCESS The item is inserted to the head.
1375 NET_MAP_ITEM *Item;
1379 Item = NetMapAllocItem (Map);
1381 if (Item == NULL) {
1385 Item->Key = Key;
1386 Item->Value = Value;
1387 InsertHeadList (&Map->Used, &Item->Link);
1395 Allocate an item to save the <Key, Value> pair to the tail of the netmap.
1397 Allocate an item to save the <Key, Value> pair and add corresponding node entry
1407 @retval EFI_OUT_OF_RESOURCES Failed to allocate the memory for the item.
1408 @retval EFI_SUCCESS The item is inserted to the tail.
1419 NET_MAP_ITEM *Item;
1423 Item = NetMapAllocItem (Map);
1425 if (Item == NULL) {
1429 Item->Key = Key;
1430 Item->Value = Value;
1431 InsertTailList (&Map->Used, &Item->Link);
1440 Check whether the item is in the Map and return TRUE if it is.
1443 @param[in] Item The item to search.
1445 @return TRUE if the item is in the netmap, otherwise FALSE.
1451 IN NET_MAP_ITEM *Item
1457 if (ListEntry == &Item->Link) {
1467 Find the key in the netmap and returns the point to the item contains the Key.
1469 Iterate the Used doubly linked list of the netmap to get every item. Compare the key of every
1470 item with the key to search. It returns the point to the item contains the Key if found.
1477 @return The point to the item contains the Key, or NULL if Key isn't in the map.
1488 NET_MAP_ITEM *Item;
1493 Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
1495 if (Item->Key == Key) {
1496 return Item;
1505 Remove the node entry of the item from the netmap and return the key of the removed item.
1507 Remove the node entry of the item from the Used doubly linked list of the netmap.
1509 entry of the item to the Recycled doubly linked list of the netmap. If Value is not NULL,
1510 Value will point to the value of the item. It returns the key of the removed item.
1513 If Item is NULL, then ASSERT().
1514 if item in not in the netmap, then ASSERT().
1516 @param[in, out] Map The netmap to remove the item from.
1517 @param[in, out] Item The item to remove.
1520 @return The key of the removed item.
1527 IN OUT NET_MAP_ITEM *Item,
1531 ASSERT ((Map != NULL) && (Item != NULL));
1532 ASSERT (NetItemInMap (Map, Item));
1534 RemoveEntryList (&Item->Link);
1536 InsertHeadList (&Map->Recycled, &Item->Link);
1539 *Value = Item->Value;
1542 return Item->Key;
1547 Remove the first node entry on the netmap and return the key of the removed item.
1552 parameter Value will point to the value of the item. It returns the key of the removed item.
1560 @return The key of the item removed.
1570 NET_MAP_ITEM *Item;
1578 Item = NET_LIST_HEAD (&Map->Used, NET_MAP_ITEM, Link);
1579 RemoveEntryList (&Item->Link);
1581 InsertHeadList (&Map->Recycled, &Item->Link);
1584 *Value = Item->Value;
1587 return Item->Key;
1592 Remove the last node entry on the netmap and return the key of the removed item.
1597 parameter Value will point to the value of the item. It returns the key of the removed item.
1605 @return The key of the item removed.
1615 NET_MAP_ITEM *Item;
1623 Item = NET_LIST_TAIL (&Map->Used, NET_MAP_ITEM, Link);
1624 RemoveEntryList (&Item->Link);
1626 InsertHeadList (&Map->Recycled, &Item->Link);
1629 *Value = Item->Value;
1632 return Item->Key;
1637 Iterate through the netmap and call CallBack for each item.
1641 delete safe for the current item.
1647 @param[in] CallBack The callback function to call for each item.
1650 @retval EFI_SUCCESS There is no item in the netmap or CallBack for each item
1667 NET_MAP_ITEM *Item;
1679 Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
1680 Result = CallBack (Map, Item, Arg);