Deleted Added
full compact
vm_radix.h (226980) vm_radix.h (226981)
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

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

45
46CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT);
47
48/* Calculates maximum value for a tree of height h. */
49#define VM_RADIX_MAX(h) \
50 ((h) == VM_RADIX_LIMIT ? ((vm_pindex_t)-1) : \
51 (((vm_pindex_t)1 << ((h) * VM_RADIX_WIDTH)) - 1))
52
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

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

45
46CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT);
47
48/* Calculates maximum value for a tree of height h. */
49#define VM_RADIX_MAX(h) \
50 ((h) == VM_RADIX_LIMIT ? ((vm_pindex_t)-1) : \
51 (((vm_pindex_t)1 << ((h) * VM_RADIX_WIDTH)) - 1))
52
53#ifdef _KERNEL
54
53struct vm_radix_node {
54 void *rn_child[VM_RADIX_COUNT]; /* child nodes. */
55 uint16_t rn_count; /* Valid children. */
56};
57
58/*
59 * Radix tree root. The height and pointer are set together to permit
60 * coherent lookups while the root is modified.

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

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
55struct vm_radix_node {
56 void *rn_child[VM_RADIX_COUNT]; /* child nodes. */
57 uint16_t rn_count; /* Valid children. */
58};
59
60/*
61 * Radix tree root. The height and pointer are set together to permit
62 * coherent lookups while the root is modified.

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

94{
95 void *val;
96
97 if (vm_radix_lookupn(rtree, index, 0, color, &val, 1, &index))
98 return (val);
99 return (NULL);
100}
101
102#endif /* _KERNEL */
100#endif /* !_VM_RADIX_H_ */
103#endif /* !_VM_RADIX_H_ */