public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] I/O thread safety
@ 2009-09-15 11:12 Stanislav Meduna
  2009-09-15 12:09 ` Chris Holgate
  0 siblings, 1 reply; 4+ messages in thread
From: Stanislav Meduna @ 2009-09-15 11:12 UTC (permalink / raw)
  To: eCos Discussion

Hi,

I'd like to ask whether and how is the thread-safety
of the I/O subsystem approached - is this a problem
of application code, each subsystem, each driver,...?

I am implementing a driver for a CAN controller
connected via a SPI interface. Each CAN controller
transaction requires a few separate SPI transactions
that should not be interrupted by transactions done
from another thread (this can be probably fixed
to do everything in one SPI transaction, but
I'd like to ask anyway).

I am accessing the driver via the CYGPKG_IO_CAN layer.
The reads are normally executed by a message event loop
in one thread blocking until a CAN message arrives,
the writes are done from another thread.

To make things even more interesting both the SPI
and the CAN device are interrupt-driven...

What is the suggested approach to make this thread-safe?
A pointer to some example code is enough.


Thanks
-- 
                                  Stano

-- 
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] 4+ messages in thread

end of thread, other threads:[~2009-09-15 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 11:12 [ECOS] I/O thread safety Stanislav Meduna
2009-09-15 12:09 ` Chris Holgate
2009-09-15 13:42   ` [ECOS] Devfs ioctl's Green, Neal
2009-09-15 15:58     ` [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).