PERFORCE change 231359 for review
Jonathan Anderson
jonathan at FreeBSD.org
Tue Jul 23 00:41:03 UTC 2013
http://p4web.freebsd.org/@@231359?ac=10
Change 231359 by jonathan at jonathan-on-zenith on 2013/07/23 00:40:35
Move \#define assert() to above the place where, as of libtesla optimisations, it is now used.
Affected files ...
.. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_internal.h#11 edit
Differences ...
==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_internal.h#11 (text+ko) ====
@@ -70,6 +70,11 @@
/** Is @a x a subset of @a y? */
#define SUBSET(x,y) ((x & y) == x)
+#ifdef _KERNEL
+/** Emulate simple POSIX assertions. */
+#define assert(cond) KASSERT((cond), ("Assertion failed: '%s'", #cond))
+#endif
+
/**
* Call this if things go catastrophically, unrecoverably wrong.
*/
@@ -194,9 +199,6 @@
/** Our @ref tesla_assert has the same signature as @ref KASSERT. */
#define tesla_assert(...) KASSERT(__VA_ARGS__)
-/** Emulate simple POSIX assertions. */
-#define assert(cond) KASSERT((cond), ("Assertion failed: '%s'", #cond))
-
#define tesla_malloc(len) malloc(len, M_TESLA, M_WAITOK | M_ZERO)
#define tesla_free(x) free(x, M_TESLA)
More information about the p4-projects
mailing list