user_flush_output() spio_t_error_code
user_flush_output(
void *user_data,
spio_t_bits flush_options
);
This is the prototype for one of the methods of user defined streams. It is used when SICStus wants to write data to the user defined stream.
SP_create_stream().
SPIO_DEVICE_FLUSH_OPTION_NONBLOCKINGSPIO_E_WOULD_BLOCK code.
If your user_flush_output will never block, you can ignore this value.
You should return SPIO_E_NOT_SUPPORTED if user_flush_output
cannot support non-blocking flush.
On success, all buffered data should have been written and
SPIO_S_NOERR or some other success code returned.
On failure, return a SPIO error code. Error codes with special meaning
for user_flush_output:
SPIO_E_END_OF_FILESPIO_E_WOULD_BLOCKSPIO_DEVICE_FLUSH_OPTION_NONBLOCKING was set but the operation
would block.
SPIO_E_NOT_SUPPORTEDSPIO_DEVICE_FLUSH_OPTION_NONBLOCKING, was passed.
Other error codes may also be returned.
Should ensure that any buffered data is transmitted to its
destination. Can be passed as NULL.
cpg-ref-SP_create_stream. Defining a New Stream.