Deleted Added
full compact
vm_radix.h (226952) vm_radix.h (226980)
1/*
2 * Copyright (c) 2008 Mayur Shardul <mayur.shardul@gmail.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 65 unchanged lines hidden (view full) ---

74/*
75 * Functions which work on specified colors. (object, vm_page_queue_free locks)
76 */
77void *vm_radix_color(struct vm_radix *, vm_pindex_t, int);
78void *vm_radix_lookup(struct vm_radix *, vm_pindex_t, int);
79int vm_radix_lookupn(struct vm_radix *, vm_pindex_t, vm_pindex_t, int,
80 void **, int, vm_pindex_t *);
81void *vm_radix_lookup_le(struct vm_radix *, vm_pindex_t, int);
1/*
2 * Copyright (c) 2008 Mayur Shardul <mayur.shardul@gmail.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 65 unchanged lines hidden (view full) ---

74/*
75 * Functions which work on specified colors. (object, vm_page_queue_free locks)
76 */
77void *vm_radix_color(struct vm_radix *, vm_pindex_t, int);
78void *vm_radix_lookup(struct vm_radix *, vm_pindex_t, int);
79int vm_radix_lookupn(struct vm_radix *, vm_pindex_t, vm_pindex_t, int,
80 void **, int, vm_pindex_t *);
81void *vm_radix_lookup_le(struct vm_radix *, vm_pindex_t, int);
82void vm_radix_reclaim_allnodes(struct vm_radix *);
82void *vm_radix_remove(struct vm_radix *, vm_pindex_t, int);
83void vm_radix_foreach(struct vm_radix *, vm_pindex_t, vm_pindex_t, int,
84 void (*)(void *));
85
86/*
87 * Look up any entry at a position greater or equal to index.
88 */
89static inline void *
90vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index, int color)
91{
92 void *val;
93
94 if (vm_radix_lookupn(rtree, index, 0, color, &val, 1, &index))
95 return (val);
96 return (NULL);
97}
98
99#endif /* !_VM_RADIX_H_ */
83void *vm_radix_remove(struct vm_radix *, vm_pindex_t, int);
84void vm_radix_foreach(struct vm_radix *, vm_pindex_t, vm_pindex_t, int,
85 void (*)(void *));
86
87/*
88 * Look up any entry at a position greater or equal to index.
89 */
90static inline void *
91vm_radix_lookup_ge(struct vm_radix *rtree, vm_pindex_t index, int color)
92{
93 void *val;
94
95 if (vm_radix_lookupn(rtree, index, 0, color, &val, 1, &index))
96 return (val);
97 return (NULL);
98}
99
100#endif /* !_VM_RADIX_H_ */