Skip to main content

read_console_data

Function read_console_data 

Source
pub unsafe extern "C" fn read_console_data(
    address: u64,
    len: u64,
    flags: u64,
) -> u64
Expand description

Read the data from console input stream (standard input).

The data is copied to address..address + len and the host-call returns the number of bytes copied. If console input stream is empty, the call blocks until new data arrives.

§Flags

  • NON_BLOCKING. Setting this flag makes the call non-blocking: if there is no data in the standard input, then the call immediately returns u64::MAX.

§VM suspension behaviour

When VM is suspended the remaining console data is discarded by the builder.