[ECOS] [SMP]serious bug in synchronisation primitives

sandeep shimple0@yahoo.com
Mon Nov 29 13:27:00 GMT 2004


>>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. 
I haven't tried this yet, but I guess it should work. but these kind of changes
would only make things work temporarily and may not be the right solution as
- amount of code you execute depends on how it was compiled, with what level of

  optimisations (-O0 or no optimisation, -O1, -O2 and so on)
- the duration of 1 tick is configurable by user
- how often interrupts come and how long one doesn't execute test code on each 
  interrupt, decide when a piece of code would finish execution
- since it is a test case, user is free to modify the values of NTEST_THREADS/
  NTEST_THREADS_SIM macros and thus influence the value of ntest_threads.

the test/fixes should be such that these parameters don't affect the desired
and correct functioning of the test.

> 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.
well, for around 2 years now, SMP work, i am doing for interest, not for need
(non-SMP goes as needs from time to time), as an when i find time b/w other
works. earlier i used to unsubscrible from ecos-lists, but then one loses touch
with things.

as and when i find bugs/issues, would inform list about these/ send patches,
the least i can do.

sandeep



		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


-- 
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