Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154299164
D23774.id68594.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
D23774.id68594.diff
View Options
Index: sys/sys/systm.h
===================================================================
--- sys/sys/systm.h
+++ sys/sys/systm.h
@@ -100,11 +100,30 @@
#endif
#endif
+#ifndef __FILE_NAME__
+#define __FILE_NAME__ __FILE__
+#endif
+
#ifdef INVARIANTS /* The option is always available */
#define KASSERT(exp,msg) do { \
if (__predict_false(!(exp))) \
kassert_panic msg; \
} while (0)
+#define KPASS(exp) do { \
+ if (__predict_false(!(exp))) \
+ kassert_panic("condition %s false at %s (%s:%d)", #exp, \
+ __func__, __FILE_NAME__, __LINE__); \
+} while (0)
+#define KPASS2(exp,str) do { \
+ if (__predict_false(!(exp))) \
+ kassert_panic("condition %s false at %s (%s:%d): %s", #exp,\
+ __func__, __FILE_NAME__, __LINE__, str); \
+} while (0)
+#define KPASS3(exp,fmt,fmtarg) do { \
+ if (__predict_false(!(exp))) \
+ kassert_panic("condition %s false at %s (%s:%d): " #fmt,\
+ #exp, __func__, __FILE_NAME__, __LINE__, fmtarg); \
+} while (0)
#define VNASSERT(exp, vp, msg) do { \
if (__predict_false(!(exp))) { \
vn_printf(vp, "VNASSERT failed: %s not true at %s:%d (%s)\n",\
@@ -120,6 +139,12 @@
#else
#define KASSERT(exp,msg) do { \
} while (0)
+#define KPASS(exp) do { \
+} while (0)
+#define KPASS2(exp,str) do { \
+} while (0)
+#define KPASS3(exp,fmt,fmtarg) do { \
+} while (0)
#define VNASSERT(exp, vp, msg) do { \
} while (0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 4:50 PM (53 m, 4 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32292897
Default Alt Text
D23774.id68594.diff (1 KB)
Attached To
Mode
D23774: Add KPASS macros
Attached
Detach File
Event Timeline
Log In to Comment