The Pedigree Project  0.1
Macros
Core locking and MPU
+ Collaboration diagram for Core locking and MPU:

Macros

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

Detailed Description

Macro Definition Documentation

#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)

Definition at line 188 of file opt.h.

#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.

Definition at line 200 of file opt.h.

#define SYS_LIGHTWEIGHT_PROT   1

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==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!

Definition at line 223 of file opt.h.