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 › Io › Uring › futexWake Private Function futexWake Doc Source Private Function std.Io.Uring.futexWake
fn futexWake (userdata : ?*anyopaque , ptr : *const u32 , max_waiters : u32 ) void Params userdata : ?*anyopaque ptr : *const u32 max_waiters : u32 File Io/Uring.zig: 2043
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064 fn futexWake (userdata : ?*anyopaque , ptr : *const u32 , max_waiters : u32 ) void {
const ev : *Evented = @ptrCast (@alignCast (userdata ));
_ = ev ;
const thread : *Thread = .current ();
thread .enqueue ().* = .{
.opcode = .FUTEX_WAKE ,
.flags = linux .IOSQE_CQE_SKIP_SUCCESS ,
.ioprio = 0 ,
.fd = @bitCast (linux .FUTEX2_FLAGS { .size = .U32 , .private = true }),
.off = max_waiters ,
.addr = @intFromPtr (ptr ),
.len = 0 ,
.rw_flags = 0 ,
.user_data = @backingInt (Completion .Userdata .futex_wake ),
.buf_index = 0 ,
.personality = 0 ,
.splice_fd_in = 0 ,
.addr3 = std .math .maxInt (u32 ),
.resv = 0 ,
};
thread .submit ();
}