[ECOS] mutexes
Gary Thomas
gary@mlbassoc.com
Thu Jan 29 13:21:00 GMT 2004
On Thu, 2004-01-29 at 03:02, Ronald Tubben wrote:
> Hi,
> Im an eCos newbie.
> Im am developing for an V850 platform but now using the linux synthetic
> target.
> 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
> MyFirstMutexVar.
> 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?).
Yes, please send the code. Trying to figure out what's wrong from a
textual description is fraught with problems.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
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