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

Function vm_radix_keydiff

freebsd/vm/vm_radix.c:291–303  ·  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

289 * It cannot accept 2 equal keys.
290 */
291static __inline uint16_t
292vm_radix_keydiff(vm_pindex_t index1, vm_pindex_t index2)
293{
294 uint16_t clev;
295
296 KASSERT(index1 != index2, ("%s: passing the same key value %jx",
297 __func__, (uintmax_t)index1));
298
299 index1 ^= index2;
300 for (clev = VM_RADIX_LIMIT;; clev--)
301 if (vm_radix_slot(index1, clev) != 0)
302 return (clev);
303}
304
305/*
306 * Returns TRUE if it can be determined that key does not belong to the

Callers 1

vm_radix_insertFunction · 0.85

Calls 1

vm_radix_slotFunction · 0.85

Tested by

no test coverage detected