Changeset 1914 in kBuild
- Timestamp:
- Oct 22, 2008 9:25:49 PM (16 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/dir.c
r1913 r1914 264 264 ISTRING_HASH_1 (key->path_key, hash); 265 265 # 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); 267 267 # endif /* CONFIG_WITH_STRCACHE2 */ 268 268 hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) key->ctime; -
trunk/src/kmk/hash.c
r1913 r1914 179 179 const char *str1 = *(const char **)((const char *)key + ht->ht_off_string); 180 180 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); 182 182 unsigned int hash_2; 183 183 -
trunk/src/kmk/strcache2.h
r1913 r1914 147 147 } 148 148 149 /* Getthe pointer hash value for the string.149 /* Calc the pointer hash value for the string. 150 150 151 151 This takes the string address, shift out the bits that are always zero … … 156 156 involve any memory accesses, just a right SHIFT and an optional AND. */ 157 157 MY_INLINE unsigned int 158 strcache2_ get_ptr_hash (struct strcache2 *cache, const char *str)158 strcache2_calc_ptr_hash (struct strcache2 *cache, const char *str) 159 159 { 160 160 (void)cache; -
trunk/src/kmk/variable.c
r1913 r1914 464 464 } 465 465 466 hash_1 = strcache2_ get_ptr_hash (&variable_strcache, name);466 hash_1 = strcache2_calc_ptr_hash (&variable_strcache, name); 467 467 ht = &setlist->set->table; 468 468 idx = hash_1 & (ht->ht_size - 1);
Note:
See TracChangeset
for help on using the changeset viewer.