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

W

Public Namespace
std.os.linux.W
pub const W = struct

Values

Functions

pub fn EXITSTATUS(s: u32) u8
pub fn TERMSIG(s: u32) SIG
pub fn STOPSIG(s: u32) SIG
pub fn IFEXITED(s: u32) bool
pub fn IFSTOPPED(s: u32) bool
pub fn IFSIGNALED(s: u32) bool

File

os/linux.zig:4380
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
pub const W = struct {
    pub const NOHANG = 1;
    pub const UNTRACED = 2;
    pub const STOPPED = 2;
    pub const EXITED = 4;
    pub const CONTINUED = 8;
    pub const NOWAIT = 0x1000000;

    pub fn EXITSTATUS(s: u32) u8 {
        return @as(u8, @intCast((s & 0xff00) >> 8));
    }
    pub fn TERMSIG(s: u32) SIG {
        return @fromBackingInt(@intCast(s & 0x7f));
    }
    pub fn STOPSIG(s: u32) SIG {
        return @fromBackingInt(@intCast(EXITSTATUS(s)));
    }
    pub fn IFEXITED(s: u32) bool {
        return (s & 0x7f) == 0;
    }
    pub fn IFSTOPPED(s: u32) bool {
        return @as(u16, @truncate(((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
    }
    pub fn IFSIGNALED(s: u32) bool {
        return (s & 0xffff) -% 1 < 0xff;
    }
}