|
|
@ -52,6 +52,9 @@ struct ck_ht_entry {
|
|
|
|
} CK_CC_ALIGNED;
|
|
|
|
} CK_CC_ALIGNED;
|
|
|
|
typedef struct ck_ht_entry ck_ht_entry_t;
|
|
|
|
typedef struct ck_ht_entry ck_ht_entry_t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define CK_HT_KEY_EMPTY ((uintptr_t)0)
|
|
|
|
|
|
|
|
#define CK_HT_KEY_TOMBSTONE (~(uintptr_t)0)
|
|
|
|
|
|
|
|
|
|
|
|
struct ck_ht_map;
|
|
|
|
struct ck_ht_map;
|
|
|
|
struct ck_ht {
|
|
|
|
struct ck_ht {
|
|
|
|
struct ck_ht_map *map;
|
|
|
|
struct ck_ht_map *map;
|
|
|
@ -77,6 +80,13 @@ ck_ht_iterator_init(struct ck_ht_iterator *iterator)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CK_CC_INLINE static bool
|
|
|
|
|
|
|
|
ck_ht_entry_empty(ck_ht_entry_t *entry)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return entry->key == CK_HT_KEY_EMPTY;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CK_CC_INLINE static void
|
|
|
|
CK_CC_INLINE static void
|
|
|
|
ck_ht_entry_key_set(ck_ht_entry_t *entry, const void *key, uint16_t key_length)
|
|
|
|
ck_ht_entry_key_set(ck_ht_entry_t *entry, const void *key, uint16_t key_length)
|
|
|
|
{
|
|
|
|
{
|
|
|
|