Simon Goldschmidt wrote:

> "Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary
> semaphores should be used instead". The only disadvantage of using
> binary semaphores (in this case, the sys_mutex_* functions are
> defined to their sys_sem_* substitute) is that you can get priority
> inversion (mutextes are only used for communication between API tasks
> using netconn or sockets and the tcpip_thread).

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.

Unless you were thinking of specific implementations of mutexes
(priority mutexes) which temporarily boost the priority of tasks
that lock that specific mutex?

-- 
Regards.

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to