1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00
freebsd/sys/dev/nvdimm
Kyle Evans c79cee7136 kernel: provide panicky version of __unreachable
__builtin_unreachable doesn't raise any compile-time warnings/errors on its
own, so problems with its usage can't be easily detected. While it would be
nice for this situation to change and compilers to at least add a warning
for trivial cases where local state means the instruction can't be reached,
this isn't the case at the moment and likely will not happen.

This commit adds an __assert_unreachable, whose intent is incredibly clear:
it asserts that this instruction is unreachable. On INVARIANTS builds, it's
a panic(), and on non-INVARIANTS it expands to  __unreachable().

Existing users of __unreachable() are converted to __assert_unreachable,
to improve debuggability if this assumption is violated.

Reviewed by:	mjg
Differential Revision:	https://reviews.freebsd.org/D23793
2020-05-13 18:07:37 +00:00
..
nvdimm_acpi.c nvdimm(4): Only expose namespaces for accessible data SPAs 2019-11-12 15:50:30 +00:00
nvdimm_e820.c
nvdimm_nfit.c
nvdimm_ns.c
nvdimm_spa.c Use atomic for start_count in devstat_start_transaction(). 2019-12-30 03:13:38 +00:00
nvdimm_var.h Use atomic for start_count in devstat_start_transaction(). 2019-12-30 03:13:38 +00:00
nvdimm.c kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00