summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2017-01-23 01:10:11 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2017-01-23 01:10:11 +0000
commit0079b6dba854f9feadbcef60171c74864a772119 (patch)
treeda3870e34a7f5bf9940722e049d8eb4e51d26841 /sys
parentddfa1cd2e00230b9ead65410bad944f11aecab6f (diff)
Move static function to the bottom of the file, to the only user
of that function, to guard it with SMALL_KERNEL. ok mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/uvm/uvm_addr.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/uvm/uvm_addr.c b/sys/uvm/uvm_addr.c
index af33700273b..896aee70a05 100644
--- a/sys/uvm/uvm_addr.c
+++ b/sys/uvm/uvm_addr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_addr.c,v 1.23 2017/01/17 17:19:21 stefan Exp $ */
+/* $OpenBSD: uvm_addr.c,v 1.24 2017/01/23 01:10:10 patrick Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -82,19 +82,6 @@ struct uaddr_pivot_state {
struct uaddr_pivot up_pivots[NUM_PIVOTS];
};
-/*
- * Free space comparison.
- * Compares smaller free-space before larger free-space.
- */
-static inline int
-uvm_mapent_fspace_cmp(const struct vm_map_entry *e1,
- const struct vm_map_entry *e2)
-{
- if (e1->fspace != e2->fspace)
- return (e1->fspace < e2->fspace ? -1 : 1);
- return (e1->start < e2->start ? -1 : e1->start > e2->start);
-}
-
/* Forward declaration (see below). */
extern const struct uvm_addr_functions uaddr_kernel_functions;
struct uvm_addr_state uaddr_kbootstrap;
@@ -1435,6 +1422,19 @@ uaddr_stack_brk_create(vaddr_t minaddr, vaddr_t maxaddr)
#ifndef SMALL_KERNEL
+/*
+ * Free space comparison.
+ * Compares smaller free-space before larger free-space.
+ */
+static inline int
+uvm_mapent_fspace_cmp(const struct vm_map_entry *e1,
+ const struct vm_map_entry *e2)
+{
+ if (e1->fspace != e2->fspace)
+ return (e1->fspace < e2->fspace ? -1 : 1);
+ return (e1->start < e2->start ? -1 : e1->start > e2->start);
+}
+
RBT_GENERATE(uaddr_free_rbtree, vm_map_entry, dfree.rbtree,
uvm_mapent_fspace_cmp);
#endif /* !SMALL_KERNEL */