Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150817450
D23793.id68679.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
D23793.id68679.diff
View Options
Index: sys/ddb/db_expr.c
===================================================================
--- sys/ddb/db_expr.c
+++ sys/ddb/db_expr.c
@@ -34,6 +34,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/systm.h>
#include <ddb/ddb.h>
#include <ddb/db_lex.h>
Index: sys/dev/nvdimm/nvdimm.c
===================================================================
--- sys/dev/nvdimm/nvdimm.c
+++ sys/dev/nvdimm/nvdimm.c
@@ -35,6 +35,7 @@
#include "opt_ddb.h"
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/bitstring.h>
#include <sys/bus.h>
Index: sys/sys/cdefs.h
===================================================================
--- sys/sys/cdefs.h
+++ sys/sys/cdefs.h
@@ -383,9 +383,13 @@
#endif
#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable)
-#define __unreachable() __builtin_unreachable()
+#define __ct_unreachable() __builtin_unreachable()
#else
-#define __unreachable() ((void)0)
+#define __ct_unreachable() ((void)0)
+#endif
+/* _KERNEL version must be obtained from sys/systm.h. */
+#ifndef _KERNEL
+#define __unreachable() __ct_unreachable()
#endif
/* XXX: should use `#if __STDC_VERSION__ < 199901'. */
Index: sys/sys/systm.h
===================================================================
--- sys/sys/systm.h
+++ sys/sys/systm.h
@@ -117,6 +117,7 @@
VNASSERT(exp, vp, ("condition %s not met at %s:%d (%s)", \
_exp, __FILE__, __LINE__, __func__)); \
} while (0)
+#define __unreachable() panic("Unreachable segment reached\n")
#else
#define KASSERT(exp,msg) do { \
} while (0)
@@ -125,6 +126,7 @@
} while (0)
#define VNPASS(exp, vp) do { \
} while (0)
+#define __unreachable() __ct_unreachable()
#endif
#ifndef CTASSERT /* Allow lint to override */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 5, 6:26 AM (14 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30874944
Default Alt Text
D23793.id68679.diff (1 KB)
Attached To
Mode
D23793: kernel: provide panicky version of __unreachable
Attached
Detach File
Event Timeline
Log In to Comment