+/* forward declarations */
+kern_return_t exception_deliver(
+ thread_t thread,
+ exception_type_t exception,
+ mach_exception_data_t code,
+ mach_msg_type_number_t codeCnt,
+ struct exception_action *excp,
+ lck_mtx_t *mutex);
+
+static kern_return_t
+check_exc_receiver_dependency(
+ exception_type_t exception,
+ struct exception_action *excp,
+ lck_mtx_t *mutex);
+
+#ifdef MACH_BSD
+kern_return_t bsd_exception(
+ exception_type_t exception,
+ mach_exception_data_t code,
+ mach_msg_type_number_t codeCnt);
+#endif /* MACH_BSD */
+
+#if __has_feature(ptrauth_calls)
+extern int exit_with_pac_exception(
+ void *proc,
+ exception_type_t exception,
+ mach_exception_code_t code,
+ mach_exception_subcode_t subcode);
+
+extern bool proc_is_traced(void *p);
+#endif /* __has_feature(ptrauth_calls) */
+
+/*
+ * Routine: exception_init
+ * Purpose:
+ * Global initialization of state for exceptions.
+ * Conditions:
+ * None.
+ */
+void
+exception_init(void)
+{
+ int tmp = 0;
+
+ if (PE_parse_boot_argn("-panic_on_exception_triage", &tmp, sizeof(tmp))) {
+ panic_on_exception_triage = true;
+ }
+}