struct MACH [src]
Alias for std.c.darwin.MACH
Members
Source
pub const MACH = struct {
pub const EXCEPTION = packed struct(exception_mask_t) {
_: u29 = 0,
/// Prefer sending a catch_exception_raice_backtrace message, if applicable.
BACKTRACE_PREFERRED: bool = false,
/// include additional exception specific errors, not used yet.
ERRORS: bool = false,
/// Send 64-bit code and subcode in the exception header */
CODES: bool = false,
pub const MASK: exception_mask_t = @bitCast(MACH.EXCEPTION{
.BACKTRACE_PREFERRED = true,
.ERRORS = true,
.CODES = true,
});
};
pub const MSG = packed struct(kern_return_t) {
_0: u10 = 0,
/// Kernel resource shortage handling an IPC capability.
VM_KERNEL: bool = false,
/// Kernel resource shortage handling out-of-line memory.
IPC_KERNEL: bool = false,
/// No room in VM address space for out-of-line memory.
VM_SPACE: bool = false,
/// No room in IPC name space for another capability name.
IPC_SPACE: bool = false,
_14: u18 = 0,
pub const MASK: kern_return_t = @bitCast(MACH.MSG{
.VM_KERNEL = true,
.IPC_KERNEL = true,
.VM_SPACE = true,
.IPC_SPACE = true,
});
pub const TIMEOUT_NONE: mach_msg_timeout_t = .NONE;
pub const OPTION_NONE: mach_msg_option_t = .NONE;
pub const STRICT_REPLY = @compileError("use MACH.RCV.STRICT_REPLY and/or MACH.SEND.STRICT_REPLY");
pub const TYPE = mach_msg_type_name_t;
};
pub const PORT = struct {
pub const NULL: mach_port_t = 0;
pub const RIGHT = mach_port_right_t;
};
pub const RCV = packed struct(integer_t) {
_0: u1 = 0,
/// Other flags are only valid if this one is set.
MSG: bool = true,
LARGE: bool = false,
LARGE_IDENTITY: bool = false,
_4: u4 = 0,
TIMEOUT: bool = false,
/// Shared between `RCV` and `SEND`. Used to be `MACH_RCV_NOTIFY`.
STRICT_REPLY: bool = false,
INTERRUPT: bool = false,
VOUCHER: bool = false,
GUARDED_DESC: bool = false,
_13: u1 = 0,
SYNC_WAIT: bool = false,
SYNC_PEEK: bool = false,
_16: u16 = 0,
};
pub const SEND = packed struct(integer_t) {
/// Other flags are only valid if this one is set.
MSG: bool = true,
_1: u3 = 0,
TIMEOUT: bool = false,
OVERRIDE: bool = false,
INTERRUPT: bool = false,
NOTIFY: bool = false,
_8: u1 = 0,
/// Shared between `RCV` and `SEND`.
STRICT_REPLY: bool = false,
_10: u6 = 0,
/// User-only. If you're the kernel, this bit is `MACH_SEND_ALWAYS`.
FILTER_NONFATAL: bool = false,
TRAILER: bool = false,
/// Synonymous to `MACH_SEND_NODENAP`.
NOIMPORTANCE: bool = false,
/// Kernel-only.
IMPORTANCE: bool = false,
SYNC_OVERRIDE: bool = false,
/// Synonymous to `MACH_SEND_SYNC_USE_THRPRI`.
PROPAGATE_QOS: bool = false,
/// Kernel-only.
KERNEL: bool = false,
SYNC_BOOTSTRAP_CHECKIN: bool = false,
_24: u8 = 0,
};
pub const TASK = struct {
pub const BASIC = struct {
pub const INFO = 20;
pub const INFO_COUNT: mach_msg_type_number_t = @sizeOf(mach_task_basic_info) / @sizeOf(natural_t);
};
};
}