Make LWIP_TCPIP_CORE_LOCKING==1 the default (and warn if LWIP_COMPAT_MUTEX==1 in that case as mutexes are required to prevent priority inversion on tcpip_thread operations)

This commit is contained in:
sg 2016-06-30 22:37:37 +02:00
parent d3e55185c6
commit 42dfa71f97
2 changed files with 4 additions and 1 deletions

View File

@ -252,6 +252,9 @@
#ifdef ETHARP_ALWAYS_INSERT
#error "ETHARP_ALWAYS_INSERT option is deprecated. Remove it from your lwipopts.h."
#endif
#if LWIP_TCPIP_CORE_LOCKING && LWIP_COMPAT_MUTEX && !defined(LWIP_COMPAT_MUTEX_ALLOWED)
#error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)"
#endif
#ifndef LWIP_DISABLE_TCP_SANITY_CHECKS
#define LWIP_DISABLE_TCP_SANITY_CHECKS 0

View File

@ -1447,7 +1447,7 @@
* Your system should provide mutexes supporting priority inversion to use this.
*/
#ifndef LWIP_TCPIP_CORE_LOCKING
#define LWIP_TCPIP_CORE_LOCKING 0
#define LWIP_TCPIP_CORE_LOCKING 1
#endif
/**