mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00
memp: fixed compiling various combinations of memp stats (display etc.)
This commit is contained in:
parent
a463119597
commit
959042aa88
@ -245,9 +245,9 @@ memp_init(void)
|
||||
memp_pools[i]->stats->illegal = 0;
|
||||
memp_pools[i]->stats->avail = memp_pools[i]->num;
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY
|
||||
memp_pools[i]->stats->name = memp_pools[i]->desc;
|
||||
#endif /* LWIP_DEBUG */
|
||||
#endif /* defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY */
|
||||
|
||||
#if LWIP_STATS
|
||||
lwip_stats.memp[i] = memp_pools[i]->stats;
|
||||
|
@ -116,7 +116,7 @@ void
|
||||
stats_display_memp(struct stats_mem *mem, int index)
|
||||
{
|
||||
if (index < MEMP_MAX) {
|
||||
stats_display_mem(mem, memp_names[index]);
|
||||
stats_display_mem(mem, mem->name);
|
||||
}
|
||||
}
|
||||
#endif /* MEMP_STATS */
|
||||
|
@ -138,10 +138,10 @@ struct memp_desc {
|
||||
/** Number of elements */
|
||||
u16_t num;
|
||||
|
||||
#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK
|
||||
#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY
|
||||
/** Textual description */
|
||||
const char *desc;
|
||||
#endif /* LWIP_DEBUG || MEMP_OVERFLOW_CHECK */
|
||||
#endif /* LWIP_DEBUG || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY */
|
||||
|
||||
/** Base address */
|
||||
u8_t *base;
|
||||
@ -151,7 +151,7 @@ struct memp_desc {
|
||||
#endif /* MEMP_MEM_MALLOC */
|
||||
};
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) || MEMP_OVERFLOW_CHECK || LWIP_STATS_DISPLAY
|
||||
#define DECLARE_LWIP_MEMPOOL_DESC(desc) (desc),
|
||||
#else
|
||||
#define DECLARE_LWIP_MEMPOOL_DESC(desc)
|
||||
|
@ -93,9 +93,9 @@ struct stats_igmp {
|
||||
};
|
||||
|
||||
struct stats_mem {
|
||||
#ifdef LWIP_DEBUG
|
||||
#if defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY
|
||||
const char *name;
|
||||
#endif /* LWIP_DEBUG */
|
||||
#endif /* defined(LWIP_DEBUG) || LWIP_STATS_DISPLAY */
|
||||
STAT_COUNTER err;
|
||||
mem_size_t avail;
|
||||
mem_size_t used;
|
||||
|
Loading…
x
Reference in New Issue
Block a user