summaryrefslogtreecommitdiffstats
path: root/include/sys/param.h
diff options
context:
space:
mode:
authorRicardo M. Correia <[email protected]>2009-02-22 03:05:40 +0000
committerBrian Behlendorf <[email protected]>2009-02-25 15:50:50 -0800
commit7819a92a9bb9e1bc5dd9f50bc644baf39f2946c9 (patch)
treea1ec377efbf206a6bd9d8351ffb97303625cb985 /include/sys/param.h
parent4327ac3ff93b7aa47d20c184d34fb1f2202b7ab5 (diff)
Added btop() and moved ptob() to include/sys/param.h.
Diffstat (limited to 'include/sys/param.h')
-rw-r--r--include/sys/param.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sys/param.h b/include/sys/param.h
index f924006ef..d6b4f761f 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 */