eyBuildLib API Reference : eyBuildLib

ebthreadio

NAME

ebthreadio - thread private standard I/O library

ROUTINES

ebthreadIoInit( ) - initialize the thread standard I/O
ebThreadIoCleanup( ) - release the thread standard I/O
ebGlobalStdGet( ) - get the file descriptor for global stdin/stdout/stderr
ebThreadStdSet( ) - redirect thread standard I/O to given file
ebThreadStdGet( ) - get current thread standard I/O

DESCRIPTION

This library support Win32, POSIX OS and VxWorks. The meaning of task of Vxworks is look as thread in other OS.

INCLUDE

ebthreadio.h


eyBuildLib : Routines

ebthreadIoInit( )

NAME

ebthreadIoInit( ) - initialize the thread standard I/O

SYNOPSIS

int ebThreadIoInit (void)

DESCRIPTION

This routine initialize the thread standard I/O.

RETURNS

OK/ERROR

SEE ALSO

ebthreadio


eyBuildLib : Routines

ebThreadIoCleanup( )

NAME

ebThreadIoCleanup( ) - release the thread standard I/O

SYNOPSIS

int ebThreadIoCleanup (void)

DESCRIPTION

This routine release the thread standard I/O.

RETURNS

OK/ERROR

SEE ALSO

ebthreadio


eyBuildLib : Routines

ebGlobalStdGet( )

NAME

ebGlobalStdGet( ) - get the file descriptor for global stdin/stdout/stderr

SYNOPSIS

FILE * ebGlobalStdGet
    (
    int io
    )

DESCRIPTION

This routine returns the file descriptor for global stdin/stdout/stderr. After call ebThreadStdSet( ), each thread will has its own stdin, stdout and stderr. So we must call this routine to get the global descriptor.

RETURNS

pointer to global descriptor, or NULL if io is invalid

SEE ALSO

ebthreadio


eyBuildLib : Routines

ebThreadStdSet( )

NAME

ebThreadStdSet( ) - redirect thread standard I/O to given file

SYNOPSIS

int ebThreadStdSet
    (
    int    io,
    FILE * newfp
    )

DESCRIPTION

This routine is to redirect thread standard I/O "io" to given file "newfp". Paramter "io" should be one of std in(0), stdout(1), stderr(2).

RETURNS

OK/ERROR

SEE ALSO

ebthreadio


eyBuildLib : Routines

ebThreadStdGet( )

NAME

ebThreadStdGet( ) - get current thread standard I/O

SYNOPSIS

FILE * ebThreadStdGet
    (
    int io
    )

DESCRIPTION

This routine is to get current thread standard I/O. Paramter "io" should be one of std in(0), stdout(1), stderr(2).

RETURNS

pointer thread standard I/O, or NULL if io invalid

SEE ALSO

ebthreadio