SYS_ARCH_DECL_PROTECT macro
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for certain critical regions during buffer allocation, deallocation and memory allocation and deallocation. SYS_ARCH_DECL_PROTECT declare a protection variable. This macro will default to defining a variable of type sys_prot_t. If a particular port needs a different implementation, then this macro may be defined in sys_arch.h.