[ECOS] Libc question.
Qiang Huang
jameshq@liverpool.ac.uk
Wed Jan 15 11:40:00 GMT 2003
Hi all:
In the code: PACKAGES\LANGUAGE\C\LIBC\stdio\current\include\io.inl
there are two definition for "cyg_stdio_read() " won't they conflict to each
other? Thanks a lot!
1.
inline Cyg_ErrNo cyg_stdio_read( cyg_stdio_handle_t dev,
void *buffer, cyg_uint32 *len )
{
if( dev != CYG_STDIO_HANDLE_NULL )
{
ssize_t done = read( dev, buffer, *len );
if( done < 0 )
{
*len = 0;
return errno;
}
*len = done;
}
// If the device is NULL, just return EOF indication
else *len = 0;
return ENOERR;
}
this is for FileIO versions of IO function.
2.
inline Cyg_ErrNo cyg_stdio_read( cyg_stdio_handle_t dev,
void *buffer, cyg_uint32 *len )
{
return cyg_io_read( dev, buffer, len );
}
this if for Direct IO versions of IO function.
why the first one is required?
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list