aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libspl/include/assert.h3
-rw-r--r--lib/libspl/include/sys/time.h14
2 files changed, 14 insertions, 3 deletions
diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h
index 026d6fef9..c080bc8aa 100644
--- a/lib/libspl/include/assert.h
+++ b/lib/libspl/include/assert.h
@@ -76,6 +76,7 @@ do { \
(u_longlong_t)__left, #OP, (u_longlong_t)__right); \
} while (0)
+#define VERIFY3B(x, y, z) VERIFY3_IMPL(x, y, z, boolean_t)
#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)
@@ -94,6 +95,7 @@ do { \
__compile_time_assertion__ ## y[(x) ? 1 : -1]
#ifdef NDEBUG
+#define ASSERT3B(x, y, z) ((void)0)
#define ASSERT3S(x, y, z) ((void)0)
#define ASSERT3U(x, y, z) ((void)0)
#define ASSERT3P(x, y, z) ((void)0)
@@ -104,6 +106,7 @@ do { \
#define IMPLY(A, B) ((void)0)
#define EQUIV(A, B) ((void)0)
#else
+#define ASSERT3B(x, y, z) VERIFY3B(x, y, z)
#define ASSERT3S(x, y, z) VERIFY3S(x, y, z)
#define ASSERT3U(x, y, z) VERIFY3U(x, y, z)
#define ASSERT3P(x, y, z) VERIFY3P(x, y, z)
diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h
index f05fcaa1c..b3dd74dd5 100644
--- a/lib/libspl/include/sys/time.h
+++ b/lib/libspl/include/sys/time.h
@@ -51,14 +51,22 @@
#endif
#ifndef MSEC2NSEC
-#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
+#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
#endif
#ifndef NSEC2MSEC
-#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
+#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
#endif
-#ifndef NSEC2SEC
+#ifndef USEC2NSEC
+#define USEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MICROSEC))
+#endif
+
+#ifndef NSEC2USEC
+#define NSEC2USEC(n) ((n) / (NANOSEC / MICROSEC))
+#endif
+
+#ifndef NSEC2SEC
#define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
#endif