MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pctrie_keydiff

Function pctrie_keydiff

freebsd/kern/subr_pctrie.c:265–277  ·  view source on GitHub ↗

* Returns the slot where two keys differ. * It cannot accept 2 equal keys. */

Source from the content-addressed store, hash-verified

263 * It cannot accept 2 equal keys.
264 */
265static __inline uint16_t
266pctrie_keydiff(uint64_t index1, uint64_t index2)
267{
268 uint16_t clev;
269
270 KASSERT(index1 != index2, ("%s: passing the same key value %jx",
271 __func__, (uintmax_t)index1));
272
273 index1 ^= index2;
274 for (clev = PCTRIE_LIMIT;; clev--)
275 if (pctrie_slot(index1, clev) != 0)
276 return (clev);
277}
278
279/*
280 * Returns TRUE if it can be determined that key does not belong to the

Callers 1

pctrie_insertFunction · 0.85

Calls 1

pctrie_slotFunction · 0.85

Tested by

no test coverage detected