From f389d78f7e03837b19c87bed06bf65fdc26e17f7 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 20 Apr 2017 21:44:00 +0200 Subject: [PATCH] Fixed bug #50838 (mem.c needs SYS_ARCH_PROTECTION around MEM_STATS) (cherry picked from commit 3770adccfd3d6103f8b26c4ad1849fbb5297476c) --- src/include/lwip/stats.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/lwip/stats.h b/src/include/lwip/stats.h index bcda2ace..5cde4a09 100644 --- a/src/include/lwip/stats.h +++ b/src/include/lwip/stats.h @@ -387,9 +387,9 @@ void stats_init(void); #if MEM_STATS #define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y -#define MEM_STATS_INC(x) STATS_INC(mem.x) -#define MEM_STATS_INC_USED(x, y) STATS_INC_USED(mem, y) -#define MEM_STATS_DEC_USED(x, y) lwip_stats.mem.x -= y +#define MEM_STATS_INC(x) SYS_ARCH_INC(lwip_stats.mem.x, 1) +#define MEM_STATS_INC_USED(x, y) SYS_ARCH_INC(lwip_stats.mem.x, y) +#define MEM_STATS_DEC_USED(x, y) SYS_ARCH_DEC(lwip_stats.mem.x, y) #define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP") #else #define MEM_STATS_AVAIL(x, y)