diff options
author | jeff <jeff@FreeBSD.org> | 2011-10-30 22:57:42 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2011-10-30 22:57:42 +0000 |
commit | 146842f2d24d5c41eb5108d34392484bde0defb2 (patch) | |
tree | 3e077adad8de42f8c90560f30134e0e38b144422 /sys/vm/vm_radix.h | |
parent | 184a6df0673dcee9f9611ca19503a52ce6c2037b (diff) | |
download | FreeBSD-src-146842f2d24d5c41eb5108d34392484bde0defb2.zip FreeBSD-src-146842f2d24d5c41eb5108d34392484bde0defb2.tar.gz |
- Extract part of vm_radix_lookupn() into a function that just finds the
first leaf page in a specified range. This permits us to make many
search & operate functions without much code duplication.
- Make a generic iterator for radix items.
Diffstat (limited to 'sys/vm/vm_radix.h')
-rw-r--r-- | sys/vm/vm_radix.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h index 487d4f0..e83ec9c 100644 --- a/sys/vm/vm_radix.h +++ b/sys/vm/vm_radix.h @@ -74,12 +74,14 @@ void vm_radix_shrink(struct vm_radix *); /* * Functions which work on specified colors. (object, vm_page_queue_free locks) */ -void *vm_radix_color(struct vm_radix *, vm_pindex_t, int color); -void *vm_radix_lookup(struct vm_radix *, vm_pindex_t, int color); -int vm_radix_lookupn(struct vm_radix *rtree, vm_pindex_t start, - vm_pindex_t end, int color, void **out, int cnt, vm_pindex_t *next); -void *vm_radix_lookup_le(struct vm_radix *, vm_pindex_t, int color); -void *vm_radix_remove(struct vm_radix *, vm_pindex_t, int color); +void *vm_radix_color(struct vm_radix *, vm_pindex_t, int); +void *vm_radix_lookup(struct vm_radix *, vm_pindex_t, int); +int vm_radix_lookupn(struct vm_radix *, vm_pindex_t, vm_pindex_t, int, + void **, int, vm_pindex_t *); +void *vm_radix_lookup_le(struct vm_radix *, vm_pindex_t, int); +void *vm_radix_remove(struct vm_radix *, vm_pindex_t, int); +void vm_radix_foreach(struct vm_radix *, vm_pindex_t, vm_pindex_t, int, + void (*)(void *)); /* * Look up any entry at a position greater or equal to index. |