[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] mutex API in system layer is necessary ?
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] mutex API in system layer is necessary ? |
Date: |
Thu, 10 May 2012 16:18:24 +0200 |
Mason <address@hidden> wrote:
> AFAIU, mutexes do not make a system immune to priority inversion.
>
> Consider 3 processes of increasing priority L, M, H.
>
> Suppose L locks a mutex; then H waits for the mutex; then M starts
> running and preempts L : H will never run, as long as M runs.
That's exactly the case we want to be able to fix by using mutexes instead of
binary semaphores.
> Unless you were thinking of specific implementations of mutexes
> (priority mutexes) which temporarily boost the priority of tasks
> that lock that specific mutex?
Of course, if your mutex implementation doesn't support this, you can use
binary semaphores as well. However, in all embedded ("realtime") OSes I've
worked with, L gets the priority of H while L owns the mutex that H waits for.
Simon
Re: [lwip-users] mutex API in system layer is necessary ?, FreeRTOS Info, 2012/05/08
Re: [lwip-users] mutex API in system layer is necessary ?, Mason, 2012/05/10
- Re: [lwip-users] mutex API in system layer is necessary ?,
Simon Goldschmidt <=