[ECOS] Pthread problem

Davies, Greg Greg.Davies@Ultra-UEMS.com
Thu Feb 14 13:10:00 GMT 2008


Hi,
	I'm having problems when I try to run more than two pthreads at
the same time. This is on a SAM7SE-EK board using the SAM7S-EK eCos
configuration. 

	The threads start up correctly and I hit the main loop of all of
them. Inside each main loop is a sched_yield() after it's done the main
work. After the last thread yields, control never returns to one of my
threads. I tried taking out all the yields, and letting ecos' preemption
take care of when to switch context, but when I do that, I only ever hit
the main loop of one of my threads. I also thought it might be a problem
with the priority of the created threads being lower than that of the
idle thread, but I haven't explored that possibility yet. 

	Is there something different about the way pthreads work in eCos
(the same code ran in linux)? I using the library the way I should be,
should I be sleeping instead of yielding? Could there be a configuration
item that could be causing this?

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