This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Problem with multiple threads
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Himanshu Patel <himanshup at aftek dot com>
- Cc: eCos Discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 30 Mar 2009 16:25:26 +0200
- Subject: Re: [ECOS] Problem with multiple threads
- References: <555EEEF90D6A464193A4558107108CF9DC8E5C@exbm.aftekpune.com>
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.html
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