Hi Andrew, We have selected CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS option. So printf should thread safe. Right?
We would try playing with http://ecos.sourceware.org/docs-latest/user-guide/kernel-instrumentation.htm l and see. Regards, Himanshu Patel -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Lunn Sent: Monday, March 30, 2009 7:55 PM To: Himanshu Patel Cc: eCos Discuss Subject: Re: [ECOS] Problem with multiple threads On Mon, Mar 30, 2009 at 07:49:45PM +0530, Himanshu Patel wrote: > Hi All, > > We are developing application with multiple threads. Application with > two threads are running without any issues (with both the threads are > getting time slice). > > Now I have requirement of adding one more thread. What is observed that, > now one of the threads gets time slice only once and then control never > return back to that thread. Priority of all the threads are equal. So > ideally all threads should get equal time slice. All three threads are > independent (not synchronized with any synchronization primitive). > > What could be the issue? Any suggestion? There are synchronisation primitives hiding where you don't initially think. eg printf. Try playing with: http://ecos.sourceware.org/docs-latest/user-guide/kernel-instrumentation.htm l 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
