This is the mail archive of the
mailing list for the GCC project.
Non-blocking read too slow on file/serial stream
- From: Jesús <jesus dot gonzalo at unileon dot es>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 04 Oct 2007 17:01:54 +0200
- Subject: Non-blocking read too slow on file/serial stream
- References: <Pine.LNX.email@example.com> <Pine.LNX.firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
I am doing a 'read' operation on a non-blocking FILE stream attached to
the serial port.
Every non-empty read (about 120 bytes) is performed in less than 200 us.
However, if no data in buffer, read returns -1 but the operation takes
1500 us or more in average. Too much for my application...