mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
vm_radix: drop unused function; use bool.
Replace boolean_t with bool in vm_radix.c. Drop the unused function vm_radix_is_singleton, which is unused and has no corresponding function in subr_pctrie.c. Reviewed by: alc Differential Revision: <https://reviews.freebsd.org/D40586>
This commit is contained in:
parent
04682968c3
commit
1efa7dbc07
2 changed files with 4 additions and 20 deletions
|
|
@ -254,7 +254,7 @@ vm_radix_root_store(struct vm_radix *rtree, struct vm_radix_node *rnode,
|
|||
/*
|
||||
* Returns TRUE if the specified radix node is a leaf and FALSE otherwise.
|
||||
*/
|
||||
static __inline boolean_t
|
||||
static __inline bool
|
||||
vm_radix_isleaf(struct vm_radix_node *rnode)
|
||||
{
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ vm_radix_keydiff(vm_pindex_t index1, vm_pindex_t index2)
|
|||
* Returns TRUE if it can be determined that key does not belong to the
|
||||
* specified rnode. Otherwise, returns FALSE.
|
||||
*/
|
||||
static __inline boolean_t
|
||||
static __inline bool
|
||||
vm_radix_keybarr(struct vm_radix_node *rnode, vm_pindex_t idx)
|
||||
{
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ vm_radix_keybarr(struct vm_radix_node *rnode, vm_pindex_t idx)
|
|||
idx = vm_radix_trimkey(idx, rnode->rn_clev + 1);
|
||||
return (idx != rnode->rn_owner);
|
||||
}
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -457,21 +457,6 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page)
|
|||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns TRUE if the specified radix tree contains a single leaf and FALSE
|
||||
* otherwise.
|
||||
*/
|
||||
boolean_t
|
||||
vm_radix_is_singleton(struct vm_radix *rtree)
|
||||
{
|
||||
struct vm_radix_node *rnode;
|
||||
|
||||
rnode = vm_radix_root_load(rtree, LOCKED);
|
||||
if (rnode == NULL)
|
||||
return (FALSE);
|
||||
return (vm_radix_isleaf(rnode));
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the value stored at the index. If the index is not present,
|
||||
* NULL is returned.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
int vm_radix_insert(struct vm_radix *rtree, vm_page_t page);
|
||||
void vm_radix_wait(void);
|
||||
boolean_t vm_radix_is_singleton(struct vm_radix *rtree);
|
||||
vm_page_t vm_radix_lookup(struct vm_radix *rtree, vm_pindex_t index);
|
||||
vm_page_t vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index);
|
||||
vm_page_t vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index);
|
||||
|
|
@ -56,7 +55,7 @@ vm_radix_init(struct vm_radix *rtree)
|
|||
rtree->rt_root = 0;
|
||||
}
|
||||
|
||||
static __inline boolean_t
|
||||
static __inline bool
|
||||
vm_radix_is_empty(struct vm_radix *rtree)
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue