Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178101928
D23793.1795966784.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
D23793.1795966784.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>
@@ -229,7 +230,7 @@
lhs |= rhs;
break;
default:
- __unreachable();
+ __assert_unreachable();
}
t = db_read_token();
}
@@ -313,7 +314,7 @@
lhs = (lhs <= rhs);
break;
default:
- __unreachable();
+ __assert_unreachable();
}
t = db_read_token();
}
Index: sys/dev/amdtemp/amdtemp.c
===================================================================
--- sys/dev/amdtemp/amdtemp.c
+++ sys/dev/amdtemp/amdtemp.c
@@ -660,7 +660,7 @@
temp |= AMDTEMP_TTSR_SELCORE;
break;
default:
- __unreachable();
+ __assert_unreachable();
}
pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1);
@@ -760,7 +760,7 @@
("sensor %d: not valid", (int)sensor));
return (amdtemp_decode_fam10h_to_17h(sc->sc_offset, val, true));
default:
- __unreachable();
+ __assert_unreachable();
}
}
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>
@@ -236,7 +237,7 @@
return (0);
}
}
- __unreachable();
+ __assert_unreachable();
}
static int
Index: sys/dev/ow/ow.c
===================================================================
--- sys/dev/ow/ow.c
+++ sys/dev/ow/ow.c
@@ -506,7 +506,7 @@
return (EIO);
goto again;
default: /* NOTREACHED */
- __unreachable();
+ __assert_unreachable();
}
if (dir) {
OWLL_WRITE_ONE(lldev, &timing_regular);
Index: sys/net/mppcc.c
===================================================================
--- sys/net/mppcc.c
+++ sys/net/mppcc.c
@@ -232,7 +232,7 @@
} else if (off < 8192) { /* 16-bit offset; 320 <= offset < 8192 */
putbits16(*dst, 0xc000|(off-320), 16, &olen, &l);
} else { /* NOTREACHED */
- __unreachable();
+ __assert_unreachable();
rtn &= ~MPPC_OK;
return (rtn);
}
Index: sys/sys/systm.h
===================================================================
--- sys/sys/systm.h
+++ sys/sys/systm.h
@@ -117,6 +117,9 @@
VNASSERT(exp, vp, ("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
#define KASSERT(exp,msg) do { \
} while (0)
@@ -125,6 +128,7 @@
} while (0)
#define VNPASS(exp, vp) do { \
} while (0)
+#define __assert_unreachable() __unreachable()
#endif
#ifndef CTASSERT /* Allow lint to override */
Index: sys/vm/vm_radix.c
===================================================================
--- sys/vm/vm_radix.c
+++ sys/vm/vm_radix.c
@@ -208,7 +208,7 @@
case SMR:
return (smr_entered_load(p, vm_radix_smr));
}
- __unreachable();
+ __assert_unreachable();
}
static __inline void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 29, 3:39 PM (9 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42092048
Default Alt Text
D23793.1795966784.diff (3 KB)
Attached To
Mode
D23793: kernel: provide panicky version of __unreachable
Attached
Detach File
Event Timeline