Fixed bug #50838 (mem.c needs SYS_ARCH_PROTECTION around MEM_STATS)

(cherry picked from commit 3770adccfd)
This commit is contained in:
goldsimon 2017-04-20 21:44:00 +02:00
parent dced7dad41
commit f389d78f7e

View File

@ -387,9 +387,9 @@ void stats_init(void);
#if MEM_STATS #if MEM_STATS
#define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y #define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y
#define MEM_STATS_INC(x) STATS_INC(mem.x) #define MEM_STATS_INC(x) SYS_ARCH_INC(lwip_stats.mem.x, 1)
#define MEM_STATS_INC_USED(x, y) STATS_INC_USED(mem, y) #define MEM_STATS_INC_USED(x, y) SYS_ARCH_INC(lwip_stats.mem.x, y)
#define MEM_STATS_DEC_USED(x, y) 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") #define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP")
#else #else
#define MEM_STATS_AVAIL(x, y) #define MEM_STATS_AVAIL(x, y)