#include <mach/exc.h> not included by <mach/mach.h> — include it explicitly
mach/exc.h 6 structs · 6 typedefs · 3 macros · 3 functions · 2 unions
extern kern_return_t exception_raise(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
exception_data_t code,
mach_msg_type_number_t codeCnt
) MIG routine from mach/exc.defs
GNU Mach reference · 7.1.8 Exceptions · © FSF, GFDL kern_return_t exception_raise(mach_port_t exception_port, mach_port_t thread, mach_port_t task, integer_t exception, integer_t code, integer_t subcode) XXX Fixme
extern kern_return_t exception_raise_state(
mach_port_t exception_port,
exception_type_t exception,
const exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor, /* inout */
const thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state, /* out */
mach_msg_type_number_t *new_stateCnt
) MIG routine from mach/exc.defs
▾ claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/mach/exc.defs
Exception-server interface routine of the exc subsystem, corresponding to the
EXCEPTION_STATE behavior. Identical in purpose to
exception_raise , except that no thread or task ports are conveyed; instead the message carries the victim thread's state in the flavor registered with
thread_set_exception_ports . The handler implements
catch_exception_raise_state , invoked via
exc_server ; it may modify flavor and return a replacement state in new_state, which the kernel installs in the thread before resuming it when the reply is
KERN_SUCCESS .
extern kern_return_t exception_raise_state_identity(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor, /* inout */
thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state, /* out */
mach_msg_type_number_t *new_stateCnt
) MIG routine from mach/exc.defs
▾ claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/mach/exc.defs
typedef struct __Request__exception_raise_t __Request__exception_raise_t; typedef struct __Request__exception_raise_state_t __Request__exception_raise_state_t; typedef struct __Request__exception_raise_state_identity_t __Request__exception_raise_state_identity_t; typedef struct __Reply__exception_raise_t __Reply__exception_raise_t; typedef struct __Reply__exception_raise_state_t __Reply__exception_raise_state_t; typedef struct __Reply__exception_raise_state_identity_t __Reply__exception_raise_state_identity_t; Generated 2026-09-08 from the headers of one specific machine (macOS 26.4.1, SDK 26.4, arm64) — not official documentation. About & caveats