Zig 0.17.0-dev (Split by item) 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.
std › c › SA Public Constant SA Doc Source Public Constant std.c.SA
pub const SA = switch (native_os ) File c.zig: 2417
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508 pub const SA = switch (native_os ) {
.linux => linux .SA ,
.emscripten => emscripten .SA ,
.driverkit , .ios , .maccatalyst , .macos , .tvos , .visionos , .watchos => struct {
/// take signal on signal stack
pub const ONSTACK = 0x0001 ;
/// restart system on signal return
pub const RESTART = 0x0002 ;
/// reset to SIG.DFL when taking signal
pub const RESETHAND = 0x0004 ;
/// do not generate SIG.CHLD on child stop
pub const NOCLDSTOP = 0x0008 ;
/// don't mask the signal we're delivering
pub const NODEFER = 0x0010 ;
/// don't keep zombies around
pub const NOCLDWAIT = 0x0020 ;
/// signal handler with SIGINFO args
pub const SIGINFO = 0x0040 ;
/// do not bounce off kernel's sigtramp
pub const USERTRAMP = 0x0100 ;
/// signal handler with SIGINFO args with 64bit regs information
pub const @"64REGSET" = 0x0200 ;
},
.freebsd => struct {
pub const ONSTACK = 0x0001 ;
pub const RESTART = 0x0002 ;
pub const RESETHAND = 0x0004 ;
pub const NOCLDSTOP = 0x0008 ;
pub const NODEFER = 0x0010 ;
pub const NOCLDWAIT = 0x0020 ;
pub const SIGINFO = 0x0040 ;
},
.illumos => struct {
pub const ONSTACK = 0x00000001 ;
pub const RESETHAND = 0x00000002 ;
pub const RESTART = 0x00000004 ;
pub const SIGINFO = 0x00000008 ;
pub const NODEFER = 0x00000010 ;
pub const NOCLDWAIT = 0x00010000 ;
},
.netbsd => struct {
pub const ONSTACK = 0x0001 ;
pub const RESTART = 0x0002 ;
pub const RESETHAND = 0x0004 ;
pub const NOCLDSTOP = 0x0008 ;
pub const NODEFER = 0x0010 ;
pub const NOCLDWAIT = 0x0020 ;
pub const SIGINFO = 0x0040 ;
},
.dragonfly => struct {
pub const ONSTACK = 0x0001 ;
pub const RESTART = 0x0002 ;
pub const RESETHAND = 0x0004 ;
pub const NODEFER = 0x0010 ;
pub const NOCLDWAIT = 0x0020 ;
pub const SIGINFO = 0x0040 ;
},
.haiku => struct {
pub const NOCLDSTOP = 0x01 ;
pub const NOCLDWAIT = 0x02 ;
pub const RESETHAND = 0x04 ;
pub const NODEFER = 0x08 ;
pub const RESTART = 0x10 ;
pub const ONSTACK = 0x20 ;
pub const SIGINFO = 0x40 ;
pub const NOMASK = NODEFER ;
pub const STACK = ONSTACK ;
pub const ONESHOT = RESETHAND ;
},
.openbsd => struct {
pub const ONSTACK = 0x0001 ;
pub const RESTART = 0x0002 ;
pub const RESETHAND = 0x0004 ;
pub const NOCLDSTOP = 0x0008 ;
pub const NODEFER = 0x0010 ;
pub const NOCLDWAIT = 0x0020 ;
pub const SIGINFO = 0x0040 ;
},
// https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L65-L71
.serenity => struct {
pub const NOCLDSTOP = 1 ;
pub const NOCLDWAIT = 2 ;
pub const SIGINFO = 4 ;
pub const ONSTACK = 0x08000000 ;
pub const RESTART = 0x10000000 ;
pub const NODEFER = 0x40000000 ;
pub const RESETHAND = 0x80000000 ;
pub const NOMASK = NODEFER ;
pub const ONESHOT = RESETHAND ;
},
else => void ,
}