Lines Matching defs:cache
34 void pt_tnt_cache_init(struct pt_tnt_cache *cache)
36 if (!cache)
39 cache->tnt = 0ull;
40 cache->index = 0ull;
43 int pt_tnt_cache_is_empty(const struct pt_tnt_cache *cache)
45 if (!cache)
48 return cache->index == 0;
51 int pt_tnt_cache_query(struct pt_tnt_cache *cache)
55 if (!cache)
58 if (!cache->index)
61 taken = (cache->tnt & cache->index) != 0;
62 cache->index >>= 1;
67 int pt_tnt_cache_update_tnt(struct pt_tnt_cache *cache,
75 if (!cache || !packet)
78 if (cache->index)
85 cache->tnt = packet->payload;
86 cache->index = 1ull << (bit_size - 1);