summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/param.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-12-29 07:00:04 +0000
committerjake <jake@FreeBSD.org>2001-12-29 07:00:04 +0000
commit8b50e3dd58dec9af155ae83972ec08afdb82fc17 (patch)
treee9e42aedb119ac362ec7637ee24ae0e6bce00134 /sys/sparc64/include/param.h
parenta086b0a1b0f7e870378e6b034afc7a299ae7b978 (diff)
downloadFreeBSD-src-8b50e3dd58dec9af155ae83972ec08afdb82fc17.zip
FreeBSD-src-8b50e3dd58dec9af155ae83972ec08afdb82fc17.tar.gz
Don't concatentate __func__.
Make page size constants explicitly long and unsigned. Add a macro for compile time assertions.
Diffstat (limited to 'sys/sparc64/include/param.h')
-rw-r--r--sys/sparc64/include/param.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h
index 8733764..60fd0bd 100644
--- a/sys/sparc64/include/param.h
+++ b/sys/sparc64/include/param.h
@@ -35,7 +35,7 @@
*/
#define TODO \
- panic("implement " __func__)
+ panic("implement %s", __func__)
/*
* Round p (pointer or byte index) up to a correctly-aligned value
@@ -86,19 +86,19 @@
#define ALIGN(p) _ALIGN(p)
#define PAGE_SHIFT_8K 13
-#define PAGE_SIZE_8K (1<<PAGE_SHIFT_8K)
+#define PAGE_SIZE_8K (1UL<<PAGE_SHIFT_8K)
#define PAGE_MASK_8K (PAGE_SIZE_8K-1)
#define PAGE_SHIFT_64K 16
-#define PAGE_SIZE_64K (1<<PAGE_SHIFT_64K)
+#define PAGE_SIZE_64K (1UL<<PAGE_SHIFT_64K)
#define PAGE_MASK_64K (PAGE_SIZE_64K-1)
#define PAGE_SHIFT_512K 19
-#define PAGE_SIZE_512K (1<<PAGE_SHIFT_512K)
+#define PAGE_SIZE_512K (1UL<<PAGE_SHIFT_512K)
#define PAGE_MASK_512K (PAGE_SIZE_512K-1)
#define PAGE_SHIFT_4M 22
-#define PAGE_SIZE_4M (1<<PAGE_SHIFT_4M)
+#define PAGE_SIZE_4M (1UL<<PAGE_SHIFT_4M)
#define PAGE_MASK_4M (PAGE_SIZE_4M-1)
#define PAGE_SHIFT_MIN PAGE_SHIFT_8K
@@ -172,5 +172,9 @@
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
+#define ASSERT_EQUAL(x, y) _ASSERT_EQUAL(x, y, __LINE__)
+#define _ASSERT_EQUAL(x, y, z) __ASSERT_EQUAL(x, y, z)
+#define __ASSERT_EQUAL(x, y, z) typedef char __assert ## z[(x) == (y) ? 1 : -1]
+
#endif /* !_MACHINE_PARAM_H_ */
#endif /* !_NO_NAMESPACE_POLLUTION */
OpenPOWER on IntegriCloud