models/cache/mcp-cache/hash_table.cpp
hash_entry* hash_set::get_entry (paddr_t tag)
{
    hash_entry *entry = NULL;
    list<hash_entry *>::iterator it;

    for (it = set_entries.begin(); it != set_entries.end(); ++it)
    {
        if ((tag == (*it)->tag) && !(*it)->free)
        {
            entry = *it;
            break;
        }
    }

    return entry;
}
//! hash_set: get_entry
//!
//! Loops through each entry in the set to see if there's a tag match. Return NULL
//! if there's no match. Otherwise, return a pointer to the matching entry.
get_entry
Loops through each entry in the set to see if there's a tag match. Return NULL
if there's no match. Otherwise, return a pointer to the matching entry.
get_entry Loops through each entry in the set to see if there ' s a tag match . Return NULL if there ' s no match . Otherwise return a pointer to the matching entry .
hash_entry* hash_set::get_entry (paddr_t tag)
{
    hash_entry *entry = NULL;
    list<hash_entry *>::iterator it;
    for (it = set_entries.begin(); it != set_entries.end(); ++it)
    {
        if ((tag == (*it)->tag) && !(*it)->free)
        {
            entry = *it;
            break;
        }
    }
    return entry;
}
hash_entry * hash_set :: get_entry ( paddr_t tag ) { hash_entry * entry = NULL ; list < hash_entry * > :: iterator it ; for ( it = set_entries . begin ( ) ; it != set_entries . end ( ) ; ++ it ) { if ( ( tag == ( * it ) -> tag ) && ! ( * it ) -> free ) { entry = * it ; break ; } } return entry ; }
hash_set: get_entry
Loops through each entry in the set to see if there's a tag match.
hash_set : get_entry Loops through each entry in the set to see if there ' s a tag match .