mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-23 08:37:02 +08:00
Better fix for bug #50838 (mem.c needs SYS_ARCH_PROTECTION around MEM_STATS): only lock where necessary
This commit is contained in:
@@ -447,6 +447,15 @@ void sys_arch_unprotect(sys_prot_t pval);
|
||||
} while(0)
|
||||
#endif /* SYS_ARCH_SET */
|
||||
|
||||
#ifndef SYS_ARCH_LOCKED
|
||||
#define SYS_ARCH_LOCKED(code) do { \
|
||||
SYS_ARCH_DECL_PROTECT(old_level); \
|
||||
SYS_ARCH_PROTECT(old_level); \
|
||||
code; \
|
||||
SYS_ARCH_UNPROTECT(old_level); \
|
||||
} while(0)
|
||||
#endif /* SYS_ARCH_LOCKED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user