CO_STREAM_OPEN


 co_error co_stream_open(co_stream stream,                         mode_t mode,                         co_type type); 

Header File

co.h

Description

This function opens a stream. It must be called from within a process run function.

Arguments

The arguments for co_stream_open are as follows:

co_stream stream

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

mode_t mode

The stream's read/write mode. Valid modes are O_RDONLY and O_WRONLY. (There are no bidirectional streams.)

co_type type

The stream's data type. The type is normally expressed as a signed or unsigned integer of a specific width using the INT_TYPE(n), UINT_TYPE(n), or CHAR_TYPE macros.


Return Value

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

co_err_none

Success (CO_ENOERROR).

co_err_invalid_arg

The stream argument is NULL (CO_ENULL_PTR) or the mode argument is neither O_RDONLY nor O_WRONLY (CO_EINVALID_MODE).

co_err_already_open

The stream is already open in this mode (CO_EALREADY_OPEN).




    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