lwIP  2.0.2
Lightweight IP stack
Core locking and MPU

Macros

#define LWIP_MPU_COMPATIBLE   0
 
#define LWIP_TCPIP_CORE_LOCKING   1
 
#define LWIP_TCPIP_CORE_LOCKING_INPUT   0
 
#define SYS_LIGHTWEIGHT_PROT   1
 

Detailed Description

Macro Definition Documentation

◆ LWIP_MPU_COMPATIBLE

#define LWIP_MPU_COMPATIBLE   0

LWIP_MPU_COMPATIBLE: enables special memory management mechanism which makes lwip able to work on MPU (Memory Protection Unit) system by not passing stack-pointers to other threads (this decreases performance as memory is allocated from pools instead of keeping it on the stack)

◆ LWIP_TCPIP_CORE_LOCKING

#define LWIP_TCPIP_CORE_LOCKING   1

LWIP_TCPIP_CORE_LOCKING Creates a global mutex that is held during TCPIP thread operations. Can be locked by client code to perform lwIP operations without changing into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE(). Your system should provide mutexes supporting priority inversion to use this.

◆ LWIP_TCPIP_CORE_LOCKING_INPUT

#define LWIP_TCPIP_CORE_LOCKING_INPUT   0

LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, this lets tcpip_input() grab the mutex for input packets as well, instead of allocating a message and passing it to tcpip_thread.

ATTENTION: this does not work when tcpip_input() is called from interrupt context!

◆ SYS_LIGHTWEIGHT_PROT

#define SYS_LIGHTWEIGHT_PROT   1

SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt protection) for certain critical regions during buffer allocation, deallocation and memory allocation and deallocation. ATTENTION: This is required when using lwIP from more than one context! If you disable this, you must be sure what you are doing!