[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Date: Tue, 29 Mar 2011 10:39:12 +0200
- From: leonp at plris.com (Leon Pollak)
- Subject: Mutex problem
I ask the community for a deep pardon - the problem found and, as always, is
On Tuesday March 29 2011, Leon Pollak wrote:
> Hello, all.
> 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 tasks path.
> 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
> 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...