Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102989184
D35652.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35652.diff
View Options
diff --git a/sys/sys/kassert.h b/sys/sys/kassert.h
--- a/sys/sys/kassert.h
+++ b/sys/sys/kassert.h
@@ -46,19 +46,35 @@
kassert_panic msg; \
} \
} while (0)
+#define MPASSERT(exp, mp, msg) do { \
+ if (__predict_false(!(exp))) { \
+ printf("MPASSERT mp %p failed: %s not true at %s:%d (%s)\n",\
+ (mp), #exp, __FILE__, __LINE__, __func__); \
+ kassert_panic msg; \
+ } \
+} while (0)
#define VNPASS(exp, vp) do { \
const char *_exp = #exp; \
VNASSERT(exp, vp, ("condition %s not met at %s:%d (%s)", \
_exp, __FILE__, __LINE__, __func__)); \
} while (0)
+#define MPPASS(exp, mp) do { \
+ const char *_exp = #exp; \
+ MPASSERT(exp, mp, ("condition %s not met at %s:%d (%s)", \
+ _exp, __FILE__, __LINE__, __func__)); \
+} while (0)
#define __assert_unreachable() \
panic("executing segment marked as unreachable at %s:%d (%s)\n", \
__FILE__, __LINE__, __func__)
#else /* INVARIANTS */
#define VNASSERT(exp, vp, msg) do { \
} while (0)
+#define MPASSERT(exp, mp, msg) do { \
+} while (0)
#define VNPASS(exp, vp) do { \
} while (0)
+#define MPPASS(exp, mp) do { \
+} while (0)
#define __assert_unreachable() __unreachable()
#endif /* INVARIANTS */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 1:14 PM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14739088
Default Alt Text
D35652.diff (1 KB)
Attached To
Mode
D35652: Add MPASSERT() and MPPASS() macros
Attached
Detach File
Event Timeline
Log In to Comment