Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144408117
D50784.id156801.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
D50784.id156801.diff
View Options
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -576,10 +576,22 @@
#else
#define __gone_ok(m, msg)
#endif
-#define gone_in(major, msg, ...) __gone_ok(major, msg) \
- _gone_in(major, msg __VA_OPT__(,) __VA_ARGS__)
-#define gone_in_dev(dev, major, msg, ...) __gone_ok(major, msg) \
- _gone_in_dev(dev, major, msg __VA_OPT__(,) __VA_ARGS__)
+#define gone_in(major, msg, ...) do { \
+ static bool __read_mostly __gone_in_ ## __LINE__ = true; \
+ __gone_ok(major, msg); \
+ if (__predict_false(__gone_in_ ## __LINE__)) { \
+ __gone_in_ ## __LINE__ = false; \
+ _gone_in(major, msg __VA_OPT__(,) __VA_ARGS__); \
+ } \
+} while (0)
+#define gone_in_dev(dev, major, msg, ...) do { \
+ static bool __read_mostly __gone_in_ ## __LINE__ = true; \
+ __gone_ok(major, msg); \
+ if (__predict_false(__gone_in_ ## __LINE__)) { \
+ __gone_in_ ## __LINE__ = false; \
+ _gone_in_dev(dev, major, msg __VA_OPT__(,) __VA_ARGS__);\
+ } \
+} while (0)
#ifdef INVARIANTS
#define __diagused
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 7:09 AM (1 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28550568
Default Alt Text
D50784.id156801.diff (1 KB)
Attached To
Mode
D50784: gone_in: enforce printing only once
Attached
Detach File
Event Timeline
Log In to Comment