#include <mach/exc.h> not included by <mach/mach.h> — include it explicitly
mach/exc.h
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 )
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 )
▾
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 )
▾
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
| mach_msg_header_t | Head | |
| mach_msg_body_t | msgh_body | start of the kernel processed data |
| mach_msg_port_descriptor_t | thread | |
| mach_msg_port_descriptor_t | task | |
| NDR_record_t | NDR | end of the kernel processed data |
| exception_type_t | exception | |
| mach_msg_type_number_t | codeCnt | |
| integer_t[2] | code |
typedef__Request__exception_raise_t
typedef struct __Request__exception_raise_t __Request__exception_raise_t;
struct__Request__exception_raise_state_t
| mach_msg_header_t | Head | |
| NDR_record_t | NDR | |
| exception_type_t | exception | |
| mach_msg_type_number_t | codeCnt | |
| integer_t[2] | code | |
| int | flavor | |
| mach_msg_type_number_t | old_stateCnt | |
| natural_t[1296] | old_state |
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
| mach_msg_header_t | Head | |
| mach_msg_body_t | msgh_body | start of the kernel processed data |
| mach_msg_port_descriptor_t | thread | |
| mach_msg_port_descriptor_t | task | |
| NDR_record_t | NDR | end of the kernel processed data |
| exception_type_t | exception | |
| mach_msg_type_number_t | codeCnt | |
| integer_t[2] | code | |
| int | flavor | |
| mach_msg_type_number_t | old_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
| __Request__exception_raise_t | Request_exception_raise | |
| __Request__exception_raise_state_t | Request_exception_raise_state | |
| __Request__exception_raise_state_identity_t | Request_exception_raise_state_identity |
struct__Reply__exception_raise_t
| mach_msg_header_t | Head | |
| NDR_record_t | NDR | |
| kern_return_t | RetCode |
typedef__Reply__exception_raise_t
typedef struct __Reply__exception_raise_t __Reply__exception_raise_t;
struct__Reply__exception_raise_state_t
| mach_msg_header_t | Head | |
| NDR_record_t | NDR | |
| kern_return_t | RetCode | |
| int | flavor | |
| mach_msg_type_number_t | new_stateCnt | |
| natural_t[1296] | new_state |
typedef__Reply__exception_raise_state_t
typedef struct __Reply__exception_raise_state_t __Reply__exception_raise_state_t;
struct__Reply__exception_raise_state_identity_t
| mach_msg_header_t | Head | |
| NDR_record_t | NDR | |
| kern_return_t | RetCode | |
| int | flavor | |
| mach_msg_type_number_t | new_stateCnt | |
| natural_t[1296] | new_state |
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
| __Reply__exception_raise_t | Reply_exception_raise | |
| __Reply__exception_raise_state_t | Reply_exception_raise_state | |
| __Reply__exception_raise_state_identity_t | Reply_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 }