This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Non-blocking read too slow on file/serial stream
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: 'Jesús' <jesus dot gonzalo at unileon dot es>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 4 Oct 2007 16:24:25 +0100
- Subject: RE: Non-blocking read too slow on file/serial stream
- References: <Pine.LNX.4.64.0709171245320.18183@s68.fhfr.qr> <Pine.LNX.4.64.0709171255430.18183@s68.fhfr.qr> <200709171520.33085.ebotcazou@adacore.com> <84fc9c000710040750y2db7fb7ehbb012a0b113b012d@mail.gmail.com> <47050062.50202@unileon.es>
On 04 October 2007 16:02, Jesús wrote:
> dear all,
>
> 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...
>
> Any explanation?
> Any workaround?
>
> Best regards
> Jesús
> Spain
Hi Jesús,
Please send this query to the gcc-help list, instead of this one. This list
is about programming the internals of the gcc compiler itself; the gcc-help
list is for help using the compiler and programming /with/ it.
(Also, when you re-send your post, add some details about what computer and
operating system you're using. And you might want to google "O_NONBLOCK"
while you're waiting for a reply...)
cheers,
DaveK
--
Can't think of a witty .sigline today....