VirtualBox

Changeset 1914 in kBuild


Ignore:
Timestamp:
Oct 22, 2008 9:25:49 PM (16 years ago)
Author:
bird
Message:

strcache2: strcache2_get_ptr_hash -> strcache2_calc_ptr_hash.

Location:
trunk/src/kmk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/dir.c

    r1913 r1914  
    264264  ISTRING_HASH_1 (key->path_key, hash);
    265265# else  /* CONFIG_WITH_STRCACHE2 */
    266   hash = strcache2_get_ptr_hash (&file_strcache, key->path_key);
     266  hash = strcache2_calc_ptr_hash (&file_strcache, key->path_key);
    267267# endif /* CONFIG_WITH_STRCACHE2 */
    268268  hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) key->ctime;
  • trunk/src/kmk/hash.c

    r1913 r1914  
    179179  const char *str1 = *(const char **)((const char *)key + ht->ht_off_string);
    180180  const char *str2;
    181   unsigned int hash_1 = strcache2_get_ptr_hash (ht->ht_strcache, str1);
     181  unsigned int hash_1 = strcache2_calc_ptr_hash (ht->ht_strcache, str1);
    182182  unsigned int hash_2;
    183183
  • trunk/src/kmk/strcache2.h

    r1913 r1914  
    147147}
    148148
    149 /* Get the pointer hash value for the string.
     149/* Calc the pointer hash value for the string.
    150150
    151151   This takes the string address, shift out the bits that are always zero
     
    156156   involve any memory accesses, just a right SHIFT and an optional AND. */
    157157MY_INLINE unsigned int
    158 strcache2_get_ptr_hash (struct strcache2 *cache, const char *str)
     158strcache2_calc_ptr_hash (struct strcache2 *cache, const char *str)
    159159{
    160160  (void)cache;
  • trunk/src/kmk/variable.c

    r1913 r1914  
    464464    }
    465465
    466   hash_1 = strcache2_get_ptr_hash (&variable_strcache, name);
     466  hash_1 = strcache2_calc_ptr_hash (&variable_strcache, name);
    467467  ht = &setlist->set->table;
    468468  idx = hash_1 & (ht->ht_size - 1);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette