CO_STREAM_CLOSE


 co_error co_stream_close(co_stream stream); 

Header File

co.h

Description

This function closes a previously opened stream. This function must be called from within a process run function.

Arguments

The argument for co_stream_close is as follows:

co_stream stream

A pointer to a stream as passed on the process argument list.


Return Value

Possible return values are listed, with values of co_errno shown in parentheses:

co_err_none

Success (CO_ENOERROR).

co_err_invalid_arg

Stream argument is NULL (CO_ENULL_PTR).

co_err_not_open

Stream is not open (CO_ENOT_OPEN).


Notes

Closing an input stream flushes any unread data from the stream and consumes one end-of-stream token. An attempt to close an input stream that has not yet received an end-of-stream token blocks until the writer closes the stream.

Closing an output stream sets the end-of-stream condition after the last unread data packet in the buffer.



    Practical FPGA Programming in C
    Practical FPGA Programming in C
    ISBN: 0131543180
    EAN: 2147483647
    Year: 2005
    Pages: 208

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net