diff --git a/src/core/init.c b/src/core/init.c index 5975ce4a..b78384f9 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -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 diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 6b43f06b..9ff31a4c 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -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 /**