[ECOS] mutexes

Ronald Tubben r.tubben@mauell.nl
Thu Jan 29 10:02:00 GMT 2004

Im an eCos newbie.
Im am developing for an V850 platform but now using the linux synthetic 
I've got a problem with mutexes but I can't find the origin of my problem.
My prog looks like this:
Ive got a class which contains a cyg_uint8 MyFirstVar and a cyg_mutex_t 
One instance of that class is used in two other classes which reads and 
writes MyFirstVar. This is done by a read function and a write function. 
Theirefore I introduced the MyFirstMutexVar to prevent the two classes 
from reading and or writing the MyFirstVar at the same time.
The problem is that I needed to declare a dummy mutexvariable to let the 
program run.
It goes wrong when the mutex is locked and have to be unlocked. When I 
introduce the dummy mutex variable is works fine. When I made more 
functions inside the variable class where I use cyg_mutex_lock an unlock 
I have to declare more dummies!

I can make a code sample if you like but I don't now its gonna help.
Perhaps someone can tell me it is my fault,  an eCos feature or 
something else (synthetic target?).

Ronald Tubben

Mauell BV

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