This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: cyg_io_lookup() with threads
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Stefan Rosinger <a_jedi_night4u at gmx dot at>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Sat, 12 Feb 2005 07:09:40 -0700
- Subject: Re: [ECOS] cyg_io_lookup() with threads
- Organization: MLB Associates
- References: <003f01c51109$5faae3e0$0500a8c0@rosinger>
On Sat, 2005-02-12 at 14:47 +0100, Stefan Rosinger wrote:
> Hi eCos group!
>
> Where I have to make a serial device lookup, if I want to use
> cyg_io_read/write with this serial device (tty based driver) in other
> threads?
> Can I do this(or have i to do it) in an own thread and pass the handle to
> the other threads?
Yes, "handles" are just pointers that the system uses to access
the device and, like everything in eCos, are a global resource.
You can also use the standard C (stdio) interfaces and just
pass around file descriptors.
--
------------------------------------------------------------
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