Replace usages of tcpip_callback_with_block(foo, bar, 0) with tcpip_try_callback()

This commit is contained in:
Dirk Ziegelmeier 2017-06-22 08:14:02 +02:00
parent b4921dc401
commit d02a73c285
5 changed files with 6 additions and 6 deletions

View File

@ -566,7 +566,7 @@ pbuf_free_int(void *p)
err_t
pbuf_free_callback(struct pbuf *p)
{
return tcpip_callback_with_block(pbuf_free_int, p, 0);
return tcpip_try_callback(pbuf_free_int, p);
}
/**
@ -579,7 +579,7 @@ pbuf_free_callback(struct pbuf *p)
err_t
mem_free_callback(void *m)
{
return tcpip_callback_with_block(mem_free, m, 0);
return tcpip_try_callback(mem_free, m);
}
#endif /* !NO_SYS */

View File

@ -1000,7 +1000,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p)
#if LWIP_NETIF_LOOPBACK_MULTITHREADING
/* For multithreading environment, schedule a call to netif_poll */
tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0);
tcpip_try_callback((tcpip_callback_fn)netif_poll, netif);
#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */
return ERR_OK;

View File

@ -99,7 +99,7 @@
#ifndef PBUF_POOL_FREE_OOSEQ_QUEUE_CALL
#include "lwip/tcpip.h"
#define PBUF_POOL_FREE_OOSEQ_QUEUE_CALL() do { \
if (tcpip_callback_with_block(pbuf_free_ooseq_callback, NULL, 0) != ERR_OK) { \
if (tcpip_try_callback(pbuf_free_ooseq_callback, NULL) != ERR_OK) { \
SYS_ARCH_PROTECT(old_level); \
pbuf_free_ooseq_pending = 0; \
SYS_ARCH_UNPROTECT(old_level); \

View File

@ -40,7 +40,7 @@ typedef void (*smtp_result_fn)(void *arg, u8_t smtp_result, u16_t srv_err, err_t
* which in turn can be used with tcpip_callback() to send mail
* from interrupt context, e.g. like this:
* struct smtp_send_request *req; (to be filled)
* tcpip_callback_with_block(smtp_send_mail_int, (void*)req, 0);
* tcpip_try_callback(smtp_send_mail_int, (void*)req);
*
* For member description, see parameter description of smtp_send_mail().
* When using with tcpip_callback, this structure has to stay allocated

View File

@ -544,7 +544,7 @@ pppos_input(ppp_pcb *ppp, u8_t *s, int l)
pbuf_header(inp, -(s16_t)(PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN));
#endif /* IP_FORWARD || LWIP_IPV6_FORWARD */
#if PPP_INPROC_IRQ_SAFE
if(tcpip_callback_with_block(pppos_input_callback, inp, 0) != ERR_OK) {
if(tcpip_try_callback(pppos_input_callback, inp) != ERR_OK) {
PPPDEBUG(LOG_ERR, ("pppos_input[%d]: tcpip_callback() failed, dropping packet\n", ppp->netif->num));
pbuf_free(inp);
LINK_STATS_INC(link.drop);