mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00
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() :-(
This commit is contained in:
parent
68d36f19f0
commit
10a5afeee7
@ -256,9 +256,6 @@ tcpip_input(struct pbuf *p, struct netif *inp)
|
|||||||
* tcpip_thread for easy access synchronization.
|
* tcpip_thread for easy access synchronization.
|
||||||
* A function called in that way may access lwIP core code
|
* A function called in that way may access lwIP core code
|
||||||
* without fearing concurrent access.
|
* 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.
|
* Blocks until the request is posted.
|
||||||
* Must not be called from interrupt context!
|
* Must not be called from interrupt context!
|
||||||
*
|
*
|
||||||
@ -271,11 +268,6 @@ tcpip_input(struct pbuf *p, struct netif *inp)
|
|||||||
err_t
|
err_t
|
||||||
tcpip_callback(tcpip_callback_fn function, void *ctx)
|
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;
|
struct tcpip_msg *msg;
|
||||||
|
|
||||||
LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox));
|
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;
|
msg->msg.cb.ctx = ctx;
|
||||||
|
|
||||||
sys_mbox_post(&mbox, msg);
|
sys_mbox_post(&mbox, msg);
|
||||||
#endif
|
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user