Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Namespace

MACH

Public Namespace
std.c.darwin.MACH
pub const MACH = struct

Namespaces

Structs

File

c/darwin.zig:130
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
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);
        };
    };
}