Author: mmacy
Date: Sat May 19 03:50:29 2018
New Revision: 333830
URL: https://svnweb.freebsd.org/changeset/base/333830

Log:
  add DBGSET macro to conditionally assign to a variable depending on INVARIANTS

Modified:
  head/sys/sys/systm.h

Modified: head/sys/sys/systm.h
==============================================================================
--- head/sys/sys/systm.h        Sat May 19 03:49:36 2018        (r333829)
+++ head/sys/sys/systm.h        Sat May 19 03:50:29 2018        (r333830)
@@ -85,6 +85,7 @@ void  kassert_panic(const char *fmt, ...)  __printflike
 #endif
 
 #ifdef INVARIANTS              /* The option is always available */
+#define        DBGSET(lhs, rhs) lhs = (rhs)
 #define        KASSERT(exp,msg) do {                                           
\
        if (__predict_false(!(exp)))                                    \
                kassert_panic msg;                                      \
@@ -96,6 +97,7 @@ void  kassert_panic(const char *fmt, ...)  __printflike
        }                                                               \
 } while (0)
 #else
+#define        DBGSET(lhs, rhs) rhs
 #define        KASSERT(exp,msg) do { \
 } while (0)
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to