This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Time slice is not happening quiet alright


Nick Garnett wrote:
No, you have misunderstood. The eCos C library is thread safe, so
whenever an IO operation takes place, such as prinyf(), a lock
associated with the stream is taken. Any other thread that tries to do
IO on the same stream will be blocked until the first thread releases
it. This is standard mutual exclusion. Any thread that is not doing IO
on that stream is not affected in any way.
Actually, the eCos docs and configtool indicate that thread safety of standard I/O calls is configurable through the define CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS - though it seems to be enabled by default in the configtool, and I can't think of a context in which you wouldn't want this unless you aren't using the kernel...
\
Jon


--

________________________________________________________________________
| |
| Jonathan C. Sevy |
| Geometric and Intelligent Computing Lab |
| Dept. of Mathematics and Computer Science |
| Drexel University |
| http://gicl.mcs.drexel.edu/sevy |
|________________________________________________________________________|




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]