# Mutex release not reverting to blocked task

**URL:** <https://forums.freertos.org/t/mutex-release-not-reverting-to-blocked-task/19040>\
**Category:** Kernel\
**Tags:** tracealyzer\
**Created:** [January 26, 2024, 2:14pm UTC](https://forums.freertos.org/t/mutex-release-not-reverting-to-blocked-task/19040 "2024-01-26T14:14:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ALL-SPACE-Paul](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/all-space-paul/32/4142_2.png) [@ALL-SPACE-Paul](https://forums.freertos.org/u/ALL-SPACE-Paul)\
**Post date:** [January 26, 2024, 2:14pm UTC](https://forums.freertos.org/t/mutex-release-not-reverting-to-blocked-task/19040/1 "2024-01-26T14:14:26Z")

</div>

Hi all,  
Have an issue with a priority inverted task not reverting, when I believe it should.

 ![image](https://d2v6vdsk2p900z.cloudfront.net/original/2X/a/a86ae19ac05ea152416c56b203cd94562b951e11.png)

So here we have a task ‘AntennaController’ (Priority 8) wating on a mutex that task ‘HeartbeatMonitor’ (Priority 5) has.  
HM’s priority increase to 8, as it should, runs, then releases the mutex… but execution doesn’t revert to task AC.  
Tracearlyser even shows that AC is ready to run.

So, what’s going on here?

Thanks, Paul.

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [January 26, 2024, 2:25pm UTC](https://forums.freertos.org/t/mutex-release-not-reverting-to-blocked-task/19040/2 "2024-01-26T14:25:50Z")

</div>

Does your HeartbeatMonitor still hold a Mutex? FreeRTOS has a somewhat simplified priority inheritance where tasks don’t drop in priority until they give up ALL their Mutexes. This avoids a lot of extra book-keeping and resource tracking that a more accurate system would need.

---

<div class="post-metadata">

**Author:** ![ALL-SPACE-Paul](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/all-space-paul/32/4142_2.png) [@ALL-SPACE-Paul](https://forums.freertos.org/u/ALL-SPACE-Paul)\
**Post date:** [January 26, 2024, 2:32pm UTC](https://forums.freertos.org/t/mutex-release-not-reverting-to-blocked-task/19040/3 "2024-01-26T14:32:30Z")

</div>

Yes it does. OK, I see, so that’s the issue then.  
That’s definitely something I’ll need to consider in other areas too then!  
Thank you!
