summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/debug.h
diff options
context:
space:
mode:
authorMadhav Suresh <madhav.suresh@delphix.com>2012-07-31 06:38:31 -0700
committerMadhav Suresh <madhav.suresh@delphix.com>2012-07-31 06:38:31 -0700
commit9fa718d2f477620f14e3f2948dd03e3470add804 (patch)
tree71b28b6487a785e3480b3409ec9239a018e4ef1a /usr/src/uts/common/sys/debug.h
parent536df542129698c6bedf6f515d0d547d89268c55 (diff)
downloadillumos-joyent-9fa718d2f477620f14e3f2948dd03e3470add804.tar.gz
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero
Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/sys/debug.h')
-rw-r--r--usr/src/uts/common/sys/debug.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/uts/common/sys/debug.h b/usr/src/uts/common/sys/debug.h
index 4de39d255e..85b8ab5f90 100644
--- a/usr/src/uts/common/sys/debug.h
+++ b/usr/src/uts/common/sys/debug.h
@@ -23,6 +23,10 @@
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
@@ -114,14 +118,18 @@ _NOTE(CONSTCOND) } while (0)
#define VERIFY3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t)
#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t)
#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t)
+#define VERIFY0(x) VERIFY3_IMPL(x, ==, 0, uintmax_t)
+
#if DEBUG
#define ASSERT3S(x, y, z) VERIFY3_IMPL(x, y, z, int64_t)
#define ASSERT3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t)
#define ASSERT3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t)
+#define ASSERT0(x) VERIFY3_IMPL(x, ==, 0, uintmax_t)
#else
#define ASSERT3S(x, y, z) ((void)0)
#define ASSERT3U(x, y, z) ((void)0)
#define ASSERT3P(x, y, z) ((void)0)
+#define ASSERT0(x) ((void)0)
#endif
#ifdef _KERNEL