From ba409253355761328dc575e069297b917d434467 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 7 Mar 2016 21:23:22 +0100 Subject: [PATCH] tcpip_send_api_msg function is only needed in non-core-locking mode --- src/api/tcpip.c | 5 +++++ src/include/lwip/priv/tcpip_priv.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 3d92ca46..8f994fdc 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -46,6 +46,7 @@ #include "lwip/mem.h" #include "lwip/init.h" #include "lwip/ip.h" +#include "lwip/pbuf.h" #include "netif/etharp.h" #define TCPIP_MSG_VAR_REF(name) API_VAR_REF(name) @@ -97,10 +98,12 @@ tcpip_thread(void *arg) continue; } switch (msg->type) { +#if !LWIP_TCPIP_CORE_LOCKING case TCPIP_MSG_API: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); msg->msg.api.function(msg->msg.api.msg); break; +#endif /* LWIP_TCPIP_CORE_LOCKING */ #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT: @@ -300,6 +303,7 @@ tcpip_untimeout(sys_timeout_handler h, void *arg) #endif /* LWIP_TCPIP_TIMEOUT */ +#if !LWIP_TCPIP_CORE_LOCKING /** * Generic way to dispatch an API message in TCPIP thread. * @@ -325,6 +329,7 @@ tcpip_send_api_msg(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) } return ERR_VAL; } +#endif /* !LWIP_TCPIP_CORE_LOCKING */ /** * Allocate a structure for a static callback message and initialize it. diff --git a/src/include/lwip/priv/tcpip_priv.h b/src/include/lwip/priv/tcpip_priv.h index e4c8fe60..5d19ee3c 100644 --- a/src/include/lwip/priv/tcpip_priv.h +++ b/src/include/lwip/priv/tcpip_priv.h @@ -95,7 +95,9 @@ extern sys_mutex_t lock_tcpip_core; #define API_EXPR_DEREF(expr) *(expr) #endif /* LWIP_MPU_COMPATIBLE */ +#if !LWIP_TCPIP_CORE_LOCKING err_t tcpip_send_api_msg(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem); +#endif /* !LWIP_TCPIP_CORE_LOCKING */ enum tcpip_msg_type { TCPIP_MSG_API,