[ECOS] [SMP]serious bug in synchronisation primitives

Nick Garnett nickg@ecoscentric.com
Wed Nov 24 12:04:00 GMT 2004


sandeep <shimple0@yahoo.com> writes:

> got a small doubt while looking at compat-posix-tm_basic test
> 
> > run_thread_tests (
> >  .....
> >  create test threads with test3 as entry
> >  cyg_thread_delay(1);
> >  wait_for_tick();
> >  pthread_cancel these test threads
> >  .....
> >  )
> 
> run_thread_tests runs with priority 30 and test3 (threads with entry
> point as test3) created with priority 10 (higher number => higher
> posix priority). so test3 threads can run only till run_thread_tests
> is delayed (for 1 tick here).
> 
> are all the created ntest_threads no. of threads expected to have run
> before run_thread_tests becomes ready again??

Yes, the purpose of the cyg_thread_delay() call is to give all the
lower priority threads a chance to run. Maybe this isn't long enough
for some reason and the main thread is restarting before they have
finished. You could try increasing that delay to 10 and see what
happens. 

> 
> -----
> 
> if some minor slips got introduced in ecos during smp transition, i
> trust ecos maintainers to fix them in time, as and when they will
> become aware of these. so far most of the problem sources have ended
> up in tests.
> as the race conditions trend is demanding, wouldn't it be better to
> have fresh tests written for SMP configuration and/or scruitinise all
> the existing tests currently marked to run fine under SMP and get only
> functioning-fine tests built under SMP configuration. if in doubt
> about some test, don't push it under set of tests built for SMP, till
> doubt is resolved.

All good ideas. Time and resources limit the amount of work the rest
of us are able to do on this. At present you are the only developer we
know working on SMP.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


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



More information about the Ecos-discuss mailing list