From 62326de7427cc9c3738c25416797660fb7026b9f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 4 Jun 2004 04:03:26 +0000 Subject: [PATCH] Move the definitions of SWAPBLK_NONE and SWAPBLK_MASK from vm_page.h to blist.h, enabling the removal of numerous #includes from subr_blist.c. (subr_blist.c and swap_pager.c are the only users of these definitions.) --- sys/kern/subr_blist.c | 5 ----- sys/sys/blist.h | 8 ++++++++ sys/vm/vm_page.h | 8 -------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c index e8193d203d3e..2c83499072de 100644 --- a/sys/kern/subr_blist.c +++ b/sys/kern/subr_blist.c @@ -96,11 +96,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include -#include -#include #else diff --git a/sys/sys/blist.h b/sys/sys/blist.h index 8cda0c02086d..e1d8fff8074c 100644 --- a/sys/sys/blist.h +++ b/sys/sys/blist.h @@ -55,6 +55,14 @@ typedef u_int32_t u_daddr_t; /* unsigned disk address */ +/* + * note: currently use SWAPBLK_NONE as an absolute value rather then + * a flag bit. + */ + +#define SWAPBLK_MASK ((daddr_t)((u_daddr_t)-1 >> 1)) /* mask */ +#define SWAPBLK_NONE ((daddr_t)((u_daddr_t)SWAPBLK_MASK + 1))/* flag */ + /* * blmeta and bl_bitmap_t MUST be a power of 2 in size. */ diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index b1b194ac3c5f..4c2d211de30a 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -146,14 +146,6 @@ CTASSERT(sizeof(u_long) >= 8); #endif #endif -/* - * note: currently use SWAPBLK_NONE as an absolute value rather then - * a flag bit. - */ - -#define SWAPBLK_MASK ((daddr_t)((u_daddr_t)-1 >> 1)) /* mask */ -#define SWAPBLK_NONE ((daddr_t)((u_daddr_t)SWAPBLK_MASK + 1))/* flag */ - #if !defined(KLD_MODULE) /* * Page coloring parameters