public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Is it possible to read and write from two different threads via the  same fopen("/dev/ser0"...) handle ???
@ 2006-04-21 20:21 oliver munz @ s p e a g
  2006-04-21 21:16 ` [ECOS] " Grant Edwards
  0 siblings, 1 reply; 2+ messages in thread
From: oliver munz @ s p e a g @ 2006-04-21 20:21 UTC (permalink / raw)
  To: ecos-discuss

I want to read and write the same serial port from a reading thread and 
from am other writeing thread. Should do this work?

I can do this via the cyg_io_read(...) and cyg_io_write(...) functions, 
but the file-version dosn't worked... But may be i did it wrong...

Oliver

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ECOS] Re: Is it possible to read and write from two different threads via the  same fopen("/dev/ser0"...) handle ???
  2006-04-21 20:21 [ECOS] Is it possible to read and write from two different threads via the same fopen("/dev/ser0"...) handle ??? oliver munz @ s p e a g
@ 2006-04-21 21:16 ` Grant Edwards
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Edwards @ 2006-04-21 21:16 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-21 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-21 20:21 [ECOS] Is it possible to read and write from two different threads via the same fopen("/dev/ser0"...) handle ??? oliver munz @ s p e a g
2006-04-21 21:16 ` [ECOS] " Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).