From 10a5afeee7fdfd780452034860d4c1c42ead4228 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 21 Jun 2017 15:07:20 +0200 Subject: [PATCH] Revert my last change to tcpip_callback() - it breaks the semantics of the function. The function previously returned after posting a message, which is a short operation. Now it actually waits until the operation has completed - which may take a long time. This may break user programs. So all that remains is the cleanup separation in tcpip_callback() and tcpip_try_callback() :-( --- src/api/tcpip.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index f2ca0f04..2d4fbab2 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -256,9 +256,6 @@ tcpip_input(struct pbuf *p, struct netif *inp) * tcpip_thread for easy access synchronization. * A function called in that way may access lwIP core code * without fearing concurrent access. - * When LWIP_TCPIP_CORE_LOCKING is enabled, the specified - * function is called after the lwIP core lock was aquired, - * no message / mbox interaction is needed. * Blocks until the request is posted. * Must not be called from interrupt context! * @@ -271,11 +268,6 @@ tcpip_input(struct pbuf *p, struct netif *inp) err_t tcpip_callback(tcpip_callback_fn function, void *ctx) { -#if LWIP_TCPIP_CORE_LOCKING - LOCK_TCPIP_CORE(); - function(ctx); - UNLOCK_TCPIP_CORE(); -#else struct tcpip_msg *msg; LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); @@ -290,7 +282,6 @@ tcpip_callback(tcpip_callback_fn function, void *ctx) msg->msg.cb.ctx = ctx; sys_mbox_post(&mbox, msg); -#endif return ERR_OK; }