This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Is it possible to read and write from two different threads via the same fopen("/dev/ser0"...) handle ???
- From: Grant Edwards <grante at visi dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 21 Apr 2006 16:16:20 -0500
- Subject: [ECOS] Re: Is it possible to read and write from two different threads via the same fopen("/dev/ser0"...) handle ???
- References: <44493EBD.7050708@speag.ch>
In gmane.os.ecos.general, you wrote:
> I want to read and write the same serial port from a reading
> thread and from am other writeing thread. Should do this work?
Yes, that should work.
> I can do this via the cyg_io_read(...) and cyg_io_write(...)
> functions,
Same here. I've always used the cyg_io_xxxx() functions to
access serial ports, and never had any problems with
"simultaneous" read/write operations from different threads.
> but the file-version dosn't worked...
I would expect that to work as well, but I've never tried it.
> But may be i did it wrong...
Maybe.
--
Grant Edwards grante Yow! I was in a HOT
at TUB! I was NORMAL! I was
visi.com ITALIAN!! I enjoyed th'
EARTHQUAKE!
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss