Print this page
Reworking of L2ARC persistency to simplify design.
@@ -23,10 +23,11 @@
* Use is subject to license terms.
*/
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright 2013 Saso Kiselkov. All rights reserved.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
@@ -130,10 +131,18 @@
#define ASSERT3U(x, y, z) ((void)0)
#define ASSERT3P(x, y, z) ((void)0)
#define ASSERT0(x) ((void)0)
#endif
+/*
+ * Compile-time assertion. The condition 'x' must be constant.
+ */
+#define CTASSERT(x) _CTASSERT(x, __LINE__)
+#define _CTASSERT(x, y) __CTASSERT(x, y)
+#define __CTASSERT(x, y) \
+ typedef char __compile_time_assertion__ ## y [(x) ? 1 : -1]
+
#ifdef _KERNEL
extern void abort_sequence_enter(char *);
extern void debug_enter(char *);