This is the mail archive of the ecos-discuss@sourceware.org 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: Problem with multiple threads


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


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