From e0918d706e47040cf54185eae2d23ea4353c8376 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 8 Jul 2016 08:17:46 +0200 Subject: [PATCH] Re-add a few MEMP stats accessors - users may want to access/display MEMP stats --- src/include/lwip/stats.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/include/lwip/stats.h b/src/include/lwip/stats.h index 628d9969..a133b12d 100644 --- a/src/include/lwip/stats.h +++ b/src/include/lwip/stats.h @@ -369,12 +369,16 @@ void stats_init(void); #define MEM_STATS_DISPLAY() #endif -#if MEMP_STATS + #if MEMP_STATS #define MEMP_STATS_DEC(x, i) STATS_DEC(memp[i]->x) -#else +#define MEMP_STATS_DISPLAY(i) stats_display_memp(lwip_stats.memp[i], i) +#define MEMP_STATS_GET(x, i) STATS_GET(memp[i]->x) + #else #define MEMP_STATS_DEC(x, i) +#define MEMP_STATS_DISPLAY(i) +#define MEMP_STATS_GET(x, i) 0 #endif - + #if SYS_STATS #define SYS_STATS_INC(x) STATS_INC(sys.x) #define SYS_STATS_DEC(x) STATS_DEC(sys.x)