We stole some bits, now we need to put them back... */
| 369 | |
| 370 | /* We stole some bits, now we need to put them back... */ |
| 371 | static COLD void update_common(struct htable *ht, const void *p) |
| 372 | { |
| 373 | uintptr_t maskdiff; |
| 374 | |
| 375 | if (ht->elems == 0) { |
| 376 | ht->common_mask = -1; |
| 377 | ht->common_bits = ((uintptr_t)p & ht->common_mask); |
| 378 | ht->perfect_bitnum = 0; |
| 379 | (void)htable_debug(ht, HTABLE_LOC); |
| 380 | return; |
| 381 | } |
| 382 | |
| 383 | /* Find bits which are unequal to old common set. */ |
| 384 | maskdiff = ht->common_bits ^ ((uintptr_t)p & ht->common_mask); |
| 385 | |
| 386 | fixup_table_common(ht, maskdiff); |
| 387 | (void)htable_debug(ht, HTABLE_LOC); |
| 388 | } |
| 389 | |
| 390 | bool htable_add_(struct htable *ht, size_t hash, const void *p) |
| 391 | { |
no test coverage detected