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. Private Function

awaiter

Private Function
std.Io.Threaded.Group.awaiter
fn awaiter(g: Group) **std.atomic.Value(u32)

Returns a correctly-typed pointer to the Io.Group.state field. The double-pointer here is intentional, because the state field itself stores a pointer, and this function returns a pointer to that field.

On completion of the whole group, if status indicates that there is an awaiter, the last task must increment this u32 and do a futex wake on it to signal that awaiter.

Params

File

Io/Threaded.zig:475
475
476
477
    fn awaiter(g: Group) **std.atomic.Value(u32) {
        return @ptrCast(&g.ptr.state);
    }