Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133110976
D23793.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D23793.diff
View Options
Index: head/sys/ddb/db_expr.c
===================================================================
--- head/sys/ddb/db_expr.c
+++ head/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: head/sys/dev/amdtemp/amdtemp.c
===================================================================
--- head/sys/dev/amdtemp/amdtemp.c
+++ head/sys/dev/amdtemp/amdtemp.c
@@ -666,7 +666,7 @@
temp |= AMDTEMP_TTSR_SELCORE;
break;
default:
- __unreachable();
+ __assert_unreachable();
}
pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1);
@@ -766,7 +766,7 @@
("sensor %d: not valid", (int)sensor));
return (amdtemp_decode_fam10h_to_17h(sc->sc_offset, val, true));
default:
- __unreachable();
+ __assert_unreachable();
}
}
Index: head/sys/dev/nvdimm/nvdimm.c
===================================================================
--- head/sys/dev/nvdimm/nvdimm.c
+++ head/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: head/sys/dev/ow/ow.c
===================================================================
--- head/sys/dev/ow/ow.c
+++ head/sys/dev/ow/ow.c
@@ -507,7 +507,7 @@
return (EIO);
goto again;
default: /* NOTREACHED */
- __unreachable();
+ __assert_unreachable();
}
if (dir) {
OWLL_WRITE_ONE(lldev, &timing_regular);
Index: head/sys/net/mppcc.c
===================================================================
--- head/sys/net/mppcc.c
+++ head/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: head/sys/sys/systm.h
===================================================================
--- head/sys/sys/systm.h
+++ head/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: head/sys/vm/vm_radix.c
===================================================================
--- head/sys/vm/vm_radix.c
+++ head/sys/vm/vm_radix.c
@@ -209,7 +209,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
Fri, Oct 24, 1:51 AM (15 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24112790
Default Alt Text
D23793.diff (3 KB)
Attached To
Mode
D23793: kernel: provide panicky version of __unreachable
Attached
Detach File
Event Timeline
Log In to Comment