Page MenuHomeFreeBSD

D11661.id30980.diff
No OneTemporary

D11661.id30980.diff

Index: head/sys/sys/_pctrie.h
===================================================================
--- head/sys/sys/_pctrie.h
+++ head/sys/sys/_pctrie.h
@@ -38,14 +38,4 @@
uintptr_t pt_root;
};
-#ifdef _KERNEL
-
-static __inline boolean_t
-pctrie_is_empty(struct pctrie *ptree)
-{
-
- return (ptree->pt_root == 0);
-}
-
-#endif /* _KERNEL */
#endif /* !__SYS_PCTRIE_H_ */
Index: head/sys/sys/pctrie.h
===================================================================
--- head/sys/sys/pctrie.h
+++ head/sys/sys/pctrie.h
@@ -119,5 +119,19 @@
size_t pctrie_node_size(void);
int pctrie_zone_init(void *mem, int size, int flags);
+static __inline void
+pctrie_init(struct pctrie *ptree)
+{
+
+ ptree->pt_root = 0;
+}
+
+static __inline boolean_t
+pctrie_is_empty(struct pctrie *ptree)
+{
+
+ return (ptree->pt_root == 0);
+}
+
#endif /* _KERNEL */
#endif /* !_SYS_PCTRIE_H_ */
Index: head/sys/vm/_vm_radix.h
===================================================================
--- head/sys/vm/_vm_radix.h
+++ head/sys/vm/_vm_radix.h
@@ -38,14 +38,4 @@
uintptr_t rt_root;
};
-#ifdef _KERNEL
-
-static __inline boolean_t
-vm_radix_is_empty(struct vm_radix *rtree)
-{
-
- return (rtree->rt_root == 0);
-}
-
-#endif /* _KERNEL */
#endif /* !__VM_RADIX_H_ */
Index: head/sys/vm/vm_object.c
===================================================================
--- head/sys/vm/vm_object.c
+++ head/sys/vm/vm_object.c
@@ -204,7 +204,7 @@
/* These are true for any object that has been freed */
object->type = OBJT_DEAD;
object->ref_count = 0;
- object->rtree.rt_root = 0;
+ vm_radix_init(&object->rtree);
object->paging_in_progress = 0;
object->resident_page_count = 0;
object->shadow_count = 0;
@@ -301,7 +301,7 @@
#endif
vm_object_zinit, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
- vm_radix_init();
+ vm_radix_zinit();
}
void
Index: head/sys/vm/vm_radix.h
===================================================================
--- head/sys/vm/vm_radix.h
+++ head/sys/vm/vm_radix.h
@@ -35,7 +35,6 @@
#ifdef _KERNEL
-void vm_radix_init(void);
int vm_radix_insert(struct vm_radix *rtree, vm_page_t page);
boolean_t vm_radix_is_singleton(struct vm_radix *rtree);
vm_page_t vm_radix_lookup(struct vm_radix *rtree, vm_pindex_t index);
@@ -44,6 +43,21 @@
void vm_radix_reclaim_allnodes(struct vm_radix *rtree);
vm_page_t vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index);
vm_page_t vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage);
+void vm_radix_zinit(void);
+
+static __inline void
+vm_radix_init(struct vm_radix *rtree)
+{
+
+ rtree->rt_root = 0;
+}
+
+static __inline boolean_t
+vm_radix_is_empty(struct vm_radix *rtree)
+{
+
+ return (rtree->rt_root == 0);
+}
#endif /* _KERNEL */
#endif /* !_VM_RADIX_H_ */
Index: head/sys/vm/vm_radix.c
===================================================================
--- head/sys/vm/vm_radix.c
+++ head/sys/vm/vm_radix.c
@@ -310,7 +310,7 @@
* Initialize the UMA slab zone.
*/
void
-vm_radix_init(void)
+vm_radix_zinit(void)
{
vm_radix_node_zone = uma_zcreate("RADIX NODE",

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 10, 7:43 PM (40 m, 8 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38664205
Default Alt Text
D11661.id30980.diff (3 KB)

Event Timeline