#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

macro_exc_user_

#define _exc_user_ 

macroexc_MSG_COUNT

#define exc_MSG_COUNT 3

functionexception_raise

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

functionexception_raise_state

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.

functionexception_raise_state_identity

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
Exception-server interface routine of the exc subsystem, corresponding to the EXCEPTION_STATE_IDENTITY behavior. Combines exception_raise and exception_raise_state: the message conveys the victim thread and task ports as well as the thread state in the registered flavor. The handler implements catch_exception_raise_state_identity, invoked via exc_server; a KERN_SUCCESS reply installs new_state in the thread and resumes it.

struct__Request__exception_raise_t

size 76, align 4
mach_msg_header_tHead
mach_msg_body_tmsgh_bodystart of the kernel processed data
mach_msg_port_descriptor_tthread
mach_msg_port_descriptor_ttask
NDR_record_tNDRend of the kernel processed data
exception_type_texception
mach_msg_type_number_tcodeCnt
integer_t[2]code

typedef__Request__exception_raise_t

typedef struct __Request__exception_raise_t __Request__exception_raise_t;

typedef__Request__exception_raise_state_t

typedef struct __Request__exception_raise_state_t __Request__exception_raise_state_t;

struct__Request__exception_raise_state_identity_t

size 5268, align 4
mach_msg_header_tHead
mach_msg_body_tmsgh_bodystart of the kernel processed data
mach_msg_port_descriptor_tthread
mach_msg_port_descriptor_ttask
NDR_record_tNDRend of the kernel processed data
exception_type_texception
mach_msg_type_number_tcodeCnt
integer_t[2]code
intflavor
mach_msg_type_number_told_stateCnt
natural_t[1296]old_state

typedef__Request__exception_raise_state_identity_t

typedef struct __Request__exception_raise_state_identity_t __Request__exception_raise_state_identity_t;

union__RequestUnion__exc_subsystem

size 5268, align 4
__Request__exception_raise_tRequest_exception_raise
__Request__exception_raise_state_tRequest_exception_raise_state
__Request__exception_raise_state_identity_tRequest_exception_raise_state_identity

typedef__Reply__exception_raise_t

typedef struct __Reply__exception_raise_t __Reply__exception_raise_t;

struct__Reply__exception_raise_state_t

size 5228, align 4
mach_msg_header_tHead
NDR_record_tNDR
kern_return_tRetCode
intflavor
mach_msg_type_number_tnew_stateCnt
natural_t[1296]new_state

typedef__Reply__exception_raise_state_t

typedef struct __Reply__exception_raise_state_t __Reply__exception_raise_state_t;

typedef__Reply__exception_raise_state_identity_t

typedef struct __Reply__exception_raise_state_identity_t __Reply__exception_raise_state_identity_t;

union__ReplyUnion__exc_subsystem

size 5228, align 4
__Reply__exception_raise_tReply_exception_raise
__Reply__exception_raise_state_tReply_exception_raise_state
__Reply__exception_raise_state_identity_tReply_exception_raise_state_identity

macrosubsystem_to_name_map_exc

#define subsystem_to_name_map_exc { "exception_raise", 2401 },
    { "exception_raise_state", 2402 },
    { "exception_raise_state_identity", 2403 }