From 7819a92a9bb9e1bc5dd9f50bc644baf39f2946c9 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Sun, 22 Feb 2009 03:05:40 +0000 Subject: [PATCH] Added btop() and moved ptob() to include/sys/param.h. --- include/sys/param.h | 4 ++++ include/sys/vmsystm.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/sys/param.h b/include/sys/param.h index f924006efa..d6b4f761f3 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -1,4 +1,8 @@ #ifndef _SPL_PARAM_H #define _SPL_PARAM_H +/* Pages to bytes and back */ +#define ptob(pages) (pages * PAGE_SIZE) +#define btop(bytes) (bytes / PAGE_SIZE) + #endif /* SPL_PARAM_H */ diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index 75ae8a9914..c75d447d94 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -40,7 +40,6 @@ * memory state and not as direct evidence that page reclaimation * is or is not currently in progress. */ -#define ptob(pages) (pages * PAGE_SIZE) #define membar_producer() smp_wmb() #define physmem num_physpages