eyBuildLib API Reference : eyBuildLib
ebthreadio - thread private standard I/O library
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
This library support Win32, POSIX OS and VxWorks. The meaning of task of Vxworks is look as thread in other OS.
ebthreadio.h
ebthreadIoInit( ) - initialize the thread standard I/O
int ebThreadIoInit (void)
This routine initialize the thread standard I/O.
OK/ERROR
ebThreadIoCleanup( ) - release the thread standard I/O
int ebThreadIoCleanup (void)
This routine release the thread standard I/O.
OK/ERROR
ebGlobalStdGet( ) - get the file descriptor for global stdin/stdout/stderr
FILE * ebGlobalStdGet ( int io )
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.
pointer to global descriptor, or NULL if io is invalid
ebThreadStdSet( ) - redirect thread standard I/O to given file
int ebThreadStdSet ( int io, FILE * newfp )
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).
OK/ERROR
ebThreadStdGet( ) - get current thread standard I/O
FILE * ebThreadStdGet ( int io )
This routine is to get current thread standard I/O. Paramter "io" should be one of std in(0), stdout(1), stderr(2).
pointer thread standard I/O, or NULL if io invalid