Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156851264
D26543.id77476.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D26543.id77476.diff
View Options
Index: sys/sys/systm.h
===================================================================
--- sys/sys/systm.h
+++ sys/sys/systm.h
@@ -47,6 +47,7 @@
#include <sys/queue.h>
#include <sys/stdint.h> /* for people using printf mainly */
+#ifdef _KERNEL
__NULLABILITY_PRAGMA_PUSH
extern int cold; /* nonzero if we are doing a cold boot */
@@ -97,8 +98,9 @@
void kassert_panic(const char *fmt, ...) __printflike(1, 2);
#else
#define kassert_panic panic
-#endif
-#endif
+#endif /* KASSERT_PANIC_OPTIONAL */
+#endif /* defined(WITNESS) || defined(INVARIANT_SUPPORT) */
+#endif /* KERNEL */
#ifdef INVARIANTS /* The option is always available */
#define KASSERT(exp,msg) do { \
@@ -135,12 +137,6 @@
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
#endif
-#if defined(_KERNEL)
-#include <sys/param.h> /* MAXCPU */
-#include <sys/pcpu.h> /* curthread */
-#include <sys/kpilite.h>
-#endif
-
/*
* Helpful macros for quickly coming up with assertions with informative
* panic messages.
@@ -151,6 +147,18 @@
#define MPASS4(ex, what, file, line) \
KASSERT((ex), ("Assertion %s failed at %s:%d", what, file, line))
+/*
+ * Align variables.
+ */
+#define __read_mostly __section(".data.read_mostly")
+#define __read_frequently __section(".data.read_frequently")
+#define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \
+ __section(".data.exclusive_cache_line")
+#ifdef _KERNEL
+#include <sys/param.h> /* MAXCPU */
+#include <sys/pcpu.h> /* curthread */
+#include <sys/kpilite.h>
+
/*
* Assert that a pointer can be loaded from memory atomically.
*
@@ -180,13 +188,6 @@
})
#define SCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread)
-/*
- * Align variables.
- */
-#define __read_mostly __section(".data.read_mostly")
-#define __read_frequently __section(".data.read_frequently")
-#define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \
- __section(".data.exclusive_cache_line")
/*
* XXX the hints declarations are even more misplaced than most declarations
* in this file, since they are needed in one file (per arch) and only used
@@ -629,4 +630,5 @@
__NULLABILITY_PRAGMA_POP
+#endif
#endif /* !_SYS_SYSTM_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 17, 9:58 PM (5 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33212114
Default Alt Text
D26543.id77476.diff (2 KB)
Attached To
Mode
D26543: Adjustments to includes for openzfs
Attached
Detach File
Event Timeline
Log In to Comment