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 library itself.
Zig › compiler/ › Maker.zig › stepReady
stepReady
Maker.stepReady
fn stepReady (
maker : *Maker ,
group : *Io .Group ,
step_index : Configuration .Step .Index ,
root_prog_node : std .Progress .Node ,
) Io .Cancelable !void
File
Code
fn stepReady (
maker : *Maker ,
group : *Io .Group ,
step_index : Configuration .Step .Index ,
root_prog_node : std .Progress .Node ,
) Io .Cancelable !void {
const graph = maker .graph ;
const io = graph .io ;
const c = &maker .scanned_config .configuration ;
const max_rss = step_index .ptr (c ).max_rss .toBytes ();
if (max_rss != 0 ) {
try maker .max_rss_mutex .lock (io );
defer maker .max_rss_mutex .unlock (io );
if (maker .available_rss < max_rss ) {
maker .memory_blocked_steps .append (maker .gpa , step_index ) catch
@panic ("TODO eliminate memory allocation here" );
return ;
}
maker .available_rss -= max_rss ;
}
group .async (io , makeStep , .{ maker , group , step_index , root_prog_node });
}