Skip to main content

patch_seq_set_exit_code

Function patch_seq_set_exit_code 

Source
#[unsafe(no_mangle)]
pub extern "C" fn patch_seq_set_exit_code(code: i64)
Expand description

Set the process exit code.

Called by generated code at the end of seq_main when the user declared main ( -- Int ). The value is the top-of-stack Int.

Release ordering is sufficient: the write happens-before the C main reads the value with Acquire, after scheduler_run has joined all strands. There is no other reader.