Mistake on this page?
Report an issue in GitHub or email us
Macros
Core locking and MPU

Macros

#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) More...
 
#define LWIP_TCPIP_CORE_LOCKING   1
 LWIP_TCPIP_CORE_LOCKING Creates a global mutex that is held during TCPIP thread operations. More...
 
#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. More...
 
#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. More...
 
#define LWIP_ASSERT_CORE_LOCKED()
 Macro/function to check whether lwIP's threading/locking requirements are satisfied during current function call. More...
 
#define LWIP_MARK_TCPIP_THREAD()
 Called as first thing in the lwIP TCPIP thread. More...
 

Detailed Description

Macro Definition Documentation

#define LWIP_ASSERT_CORE_LOCKED ( )

Macro/function to check whether lwIP's threading/locking requirements are satisfied during current function call.

This macro usually calls a function that is implemented in the OS-dependent sys layer and performs the following checks:

Definition at line 227 of file opt.h.

#define LWIP_MARK_TCPIP_THREAD ( )

Called as first thing in the lwIP TCPIP thread.

Can be used in conjunction with LWIP_ASSERT_CORE_LOCKED to check core locking.

See also
Multithreading

Definition at line 236 of file opt.h.

#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 178 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 190 of file opt.h.

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

Definition at line 202 of file opt.h.

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

Definition at line 213 of file opt.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.