From 8ce49499ae6345dc7d8c0fe3bd1c1d8065a2d05b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 25 Apr 2016 21:21:16 +0200 Subject: [PATCH] tcpip_priv.h: More API improvements --- src/include/lwip/priv/api_msg.h | 5 +---- src/include/lwip/priv/tcpip_priv.h | 8 ++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/include/lwip/priv/api_msg.h b/src/include/lwip/priv/api_msg.h index 9c3b4750..d37bd15d 100644 --- a/src/include/lwip/priv/api_msg.h +++ b/src/include/lwip/priv/api_msg.h @@ -45,22 +45,19 @@ #include "lwip/sys.h" #include "lwip/igmp.h" #include "lwip/api.h" +#include "lwip/priv/tcpip_priv.h" #ifdef __cplusplus extern "C" { #endif #if LWIP_MPU_COMPATIBLE -#define API_MSG_M_DEF(m) m -#define API_MSG_M_DEF_C(t, m) t m #if LWIP_NETCONN_SEM_PER_THREAD #define API_MSG_M_DEF_SEM(m) *m #else #define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m) #endif #else /* LWIP_MPU_COMPATIBLE */ -#define API_MSG_M_DEF(m) *m -#define API_MSG_M_DEF_C(t, m) const t * m #define API_MSG_M_DEF_SEM(m) API_MSG_M_DEF(m) #endif /* LWIP_MPU_COMPATIBLE */ diff --git a/src/include/lwip/priv/tcpip_priv.h b/src/include/lwip/priv/tcpip_priv.h index 1aecdc38..c754e3d0 100644 --- a/src/include/lwip/priv/tcpip_priv.h +++ b/src/include/lwip/priv/tcpip_priv.h @@ -75,17 +75,21 @@ struct netif; #define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) #endif #define API_EXPR_DEREF(expr) expr +#define API_MSG_M_DEF(m) m +#define API_MSG_M_DEF_C(t, m) t m #else /* LWIP_MPU_COMPATIBLE */ #define API_VAR_REF(name) name #define API_VAR_DECLARE(type, name) type name -#define API_VAR_ALLOC(type, pool, name) -#define API_VAR_ALLOC_POOL(type, pool, name) +#define API_VAR_ALLOC(type, pool, name, errorval) +#define API_VAR_ALLOC_POOL(type, pool, name, errorval) #define API_VAR_ALLOC_DONTFAIL(type, pool, name) #define API_VAR_FREE(pool, name) #define API_VAR_FREE_POOL(pool, name) #define API_EXPR_REF(expr) expr #define API_EXPR_REF_SEM(expr) API_EXPR_REF(expr) #define API_EXPR_DEREF(expr) *(expr) +#define API_MSG_M_DEF(m) *m +#define API_MSG_M_DEF_C(t, m) const t * m #endif /* LWIP_MPU_COMPATIBLE */ err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem);