Changeset 1902 for trunk/src/kmk/hash.h


Ignore:
Timestamp:
Oct 21, 2008, 5:57:00 AM (17 years ago)
Author:
bird
Message:

kmk: Moved the strcache hash optimizations into the hash code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/hash.h

    r1864 r1902  
    5454  hash_func_t ht_hash_2;        /* secondary hash function */
    5555  hash_cmp_func_t ht_compare;   /* comparison function */
     56#ifdef CONFIG_WITH_STRCACHE2
     57  struct strcache2 *ht_strcache; /* the string cache pointer. */
     58  unsigned int ht_off_string;  /* offsetof (struct key, string) */
     59#endif
    5660};
    5761
     
    6367                    unsigned long cardinality, unsigned long size));
    6468void **hash_find_slot __P((struct hash_table *ht, void const *key));
    65 #ifdef CONFIG_WITH_VALUE_LENGTH
    66 void **hash_find_slot_prehashed __P((struct hash_table *ht, const void *key,
    67                                      unsigned int hash_1, unsigned int hash_2));
    68 #endif
    6969void *hash_find_item __P((struct hash_table *ht, void const *key));
    7070void *hash_insert __P((struct hash_table *ht, const void *item));
     
    8484void **hash_dump __P((struct hash_table *ht, void **vector_0, qsort_cmp_t compare));
    8585
     86#ifdef CONFIG_WITH_STRCACHE2
     87void hash_init_strcached __P((struct hash_table *ht, unsigned long size,
     88                              struct strcache2 *strcache, unsigned int off_strptr));
     89void **hash_find_slot_strcached __P((struct hash_table *ht, const void *key));
     90void *hash_find_item_strcached __P((struct hash_table *ht, void const *key));
     91void *hash_insert_strcached __P((struct hash_table *ht, const void *item));
     92void *hash_delete_strcached __P((struct hash_table *ht, void const *item));
     93#endif /* CONFIG_WITH_STRCACHE2 */
     94
    8695extern void *hash_deleted_item;
    8796#define HASH_VACANT(item) ((item) == 0 || (void *) (item) == hash_deleted_item)
Note: See TracChangeset for help on using the changeset viewer.