From 0079b6dba854f9feadbcef60171c74864a772119 Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Mon, 23 Jan 2017 01:10:11 +0000 Subject: Move static function to the bottom of the file, to the only user of that function, to guard it with SMALL_KERNEL. ok mpi@ --- sys/uvm/uvm_addr.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'sys') 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 @@ -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 */ -- cgit v1.2.3