[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Date: Tue, 29 Mar 2011 09:02:11 +0200
- From: leonp at plris.com (Leon Pollak)
- Subject: Mutex problem
I am running 4.8.0 and have some strange situation (below). Are there any
known problems in this version with mutexes?
Two tasks A (prio 2) and B (prio 135) are competing on a resource protected by
mutex (FIFO mode). I made memory logger, which logs each suspicious point both
It also logs the value (I k ow the number of the semaphore to be 25):
What I see is that A enters (lock=1), obtains the mutex (lock=0), starts
processing, waits for the I/O and at this point B enters and stands waiting
for the mutex. lock=0 all the time, which seems correct.
Then, A finishes, (lock=0), RELEASES the mutex - lock still is 0!!??
Here I supposed, that the token was implicitly passed to task B, although it
does not run yet.
OK, now B continues, releases the semaphore, but lock again is 0. And remains
as such forever. The system is succefully blocked and does nothing..:-)
When I ask for semaphore state with the help of GDB macros, I see that
semaphore is held by task B.
Any hint will be highly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...