LIBIO question

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Wed Sep 15 18:07:50 UTC 2004


Etienne Fortin wrote:
> Hi there,
> Let's say I have the following line of code somewhere in my App:
> 
> 	fwrite(fd, 1, 10, buf);
> 
> Let's say also that the 10 bytes to send are divided into 2 write to the
> driver, each of 5 bytes. The driver will then be called 2 times with a
> buffer of size 5 each time.
> 
> Question: At the first call to the driver's write function with the 5
> first bytes, is there a way to know that there's still 5 other bytes
> waiting in the queue to be sent and that the write function will be
> called again?

Until the application makes the 2nd fwrite call, they do not
exist from the driver's or libio's perspective.  They are not in any
buffering subsystem and thus cannot be expected.

> Etienne Fortin
> Sensio
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list