This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: cyg_io_read
- From: Gary Thomas <gary at mlbassoc dot com>
- To: baljeet singh <baljeet45 at yahoo dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 14 Mar 2005 20:44:11 -0700
- Subject: Re: [ECOS] cyg_io_read
- Organization: MLB Associates
- References: <20050315033604.77080.qmail@web60809.mail.yahoo.com>
On Mon, 2005-03-14 at 19:36 -0800, baljeet singh wrote:
> All,
> one of the parameters in the cyg_io_read(..) is
> the number of bytes to read. Process blocks till
> specified number of bytes have been read. If the
> specified number of bytes is not received, the
> process stays blocked.
> Question: Is there a way to block the process for
> a specified amount of time such that the prcoess
> should return on either receiving the specified
> number of bytes or when the specified delay times
> out?
Use a higher level of I/O (file I/O package -> open, close,
etc). Then you can use select with timeouts.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss