This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Problem with multiple threads
- From: "Himanshu Patel" <himanshup at aftek dot com>
- To: "'Andrew Lunn'" <andrew at lunn dot ch>
- Cc: "'eCos Discuss'" <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 3 Apr 2009 18:28:20 +0530
- Subject: RE: [ECOS] Problem with multiple threads
- References: <555EEEF90D6A464193A4558107108CF9DC8E5C@exbm.aftekpune.com> <20090330142526.GM17160@lunn.ch> <000001c9b154$f0fef620$d2fce260$@com> <20090330173144.GF28253@lunn.ch>
Hi Andrew,
After explicitly synchronizing printf with mutex, time slicing is working as
expected (although we have enabled CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS).
Regards,
Himanshu Patel
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Andrew Lunn
Sent: Monday, March 30, 2009 11:02 PM
To: Himanshu Patel
Cc: 'Andrew Lunn'; 'eCos Discuss'
Subject: Re: [ECOS] Problem with multiple threads
On Mon, Mar 30, 2009 at 10:01:09PM +0530, Himanshu Patel wrote:
> Hi Andrew,
>
> We have selected CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS option. So printf
> should thread safe. Right?
Sure it is thread safe. However to be thread safe it uses mutex's
which are a form of synchronization.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss