git: 1efa7dbc0798 - main - vm_radix: drop unused function; use bool.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Jun 2023 04:54:09 UTC
The branch main has been updated by dougm:
URL: https://cgit.FreeBSD.org/src/commit/?id=1efa7dbc0798ee883e4e5d7127161032186829e2
commit 1efa7dbc0798ee883e4e5d7127161032186829e2
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2023-06-21 04:52:27 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2023-06-21 04:52:27 +0000
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>
---
sys/vm/vm_radix.c | 21 +++------------------
sys/vm/vm_radix.h | 3 +--
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c
index 836c3652c2c1..6848f0b2c30e 100644
--- a/sys/vm/vm_radix.c
+++ b/sys/vm/vm_radix.c
@@ -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.
diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h
index f38956ef305e..b478cf4b734b 100644
--- a/sys/vm/vm_radix.h
+++ b/sys/vm/vm_radix.h
@@ -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)
{