[ECOS] suspend/resume nesting

Thomas Koeller thomas@koeller.dyndns.org
Tue May 20 20:11:00 GMT 2003

On Tuesday, 20. May 2003 21:00, Eric Donnat wrote:
> I'm not sure that only such a patch is the solution to this issue.
> I remember reading somewhere the suspend/resume were only to be used
> to implement some kind of debugging tricks. If I understand your
> point of view you are trying to use them in order to implement a
> kind of synchronous thread RPC. The problem of such services is
> much complex than exposed here because they could lead to priority
> inversion issues when more than three threads are playing with them.
> From my previous experience, I found than implementing synchronous
> mechanisms never requires suspend/resume, from the fact that
> eCos is already exporting all what you need via existing synchronization
> primitives (such as flags), thread priority control, and scheduler
> control. IMHO, suspend/resume is like playing with fire.

Both cyg_thread_suspend() and cyg_thread_resume() are officially
documented API functions, and so they should be usable. Other
synchronization mechanisms may be built upon them. I also
think there are valid uses for them, and I have been using such
mechanisms sucessfully through the years. Of course, you have
to know what you're doing, but thats true for any other programming
construct as well.



Thomas Koeller, Software Development

Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg

Phone	+49 (4102) 463-390
Fax	+49 (4102) 463-46390


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

More information about the Ecos-discuss mailing list