next up previous contents index
Next: 5.7.6 flow: Suspend or Up: 5.7 oskit_ttystream: Interface to Previous: 5.7.4 drain: Wait until

5.7.5 flush: Discared buffered input and/or output data

 

SYNOPSIS

#include <oskit/io/ttystream.h>

OSKIT_COMDECL flush(oskit_ttystream_t *tty, int queue_selector);

DESCRIPTION

This method discards any buffered output data that has not yet been transmitted, and/or any buffered input data that has not yet been read, depending on the queue_selector parameter. This method corresponds to the POSIX tcflush function; see the POSIX standard for details.

PARAMETERS

tty
The TTY stream object to flush.
queue_selector
Must be one of the following:
OSKIT_TCIFLUSH
Flush the input buffer.
OSKIT_TCOFLUSH
Flush the output buffer.
OSKIT_TCIOFLUSH
Flush the input and output buffers.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group