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 › Threaded › Syscall › finish Private Function finish Doc Source Private Function std.Io.Threaded.Syscall.finish
fn finish (s : Syscall ) void Params File Io/Threaded.zig: 1390
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405 fn finish (s : Syscall ) void {
const thread = s .thread orelse return ;
switch (thread .status .fetchXor (.{
.cancelation = @fromBackingInt (@intCast (0b011 )),
.awaitable = .null ,
}, .monotonic ).cancelation ) {
.none => unreachable ,
.parked => unreachable ,
.blocked_alertable => unreachable ,
.blocked_alertable_canceling => unreachable ,
.canceling => unreachable ,
.canceled => unreachable ,
.blocked => {}, // new status is `.none`
.blocked_canceling => {}, // new status is `.canceling`
}
}
Marks this syscall as finished.