diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h --- a/sys/vm/vm_radix.h +++ b/sys/vm/vm_radix.h @@ -60,7 +60,7 @@ vm_radix_node_free, vm_radix_smr); /* - * Inserts the key-value pair into the trie. + * Inserts the key-value pair into the trie, starting search from root. * Panics if the key already exists. */ static __inline int @@ -69,6 +69,16 @@ return (VM_RADIX_PCTRIE_INSERT(&rtree->rt_trie, page)); } +/* + * Inserts the key-value pair into the trie, starting search from iterator. + * Panics if the key already exists. + */ +static __inline int +vm_radix_iter_insert(struct pctrie_iter *pages, vm_page_t page) +{ + return (VM_RADIX_PCTRIE_ITER_INSERT(pages, page)); +} + /* * Insert the page into the vm_radix tree with its pindex as the key. Panic if * the pindex already exists. Return zero on success or a non-zero error on @@ -187,6 +197,15 @@ { return (VM_RADIX_PCTRIE_REMOVE_LOOKUP(&rtree->rt_trie, index)); } + +/* + * Remove the current page from the trie. + */ +static __inline void +vm_radix_iter_remove(struct pctrie_iter *pages) +{ + VM_RADIX_PCTRIE_ITER_REMOVE(pages); +} /* * Reclaim all the interior nodes of the trie, and invoke the callback