mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 06:36:51 +08:00
PPP, PPPoS, renamed PPP_INPROC_MULTITHREADED to PPP_INPROC_IRQ_SAFE
Follow-up of the #44565 bug fix, renamed the misnamed PPP_INPROC_MULTITHREADED to PPP_INPROC_IRQ_SAFE because it is IRQ safe but not thread safe. Updated PPP documentation which now clearly state when and how this feature can be used.
This commit is contained in:
@@ -1916,22 +1916,12 @@
|
||||
#if PPP_SUPPORT
|
||||
|
||||
/**
|
||||
* PPP_INPROC_MULTITHREADED==1 call ppp_input() using tcpip_callback().
|
||||
* PPP_INPROC_IRQ_SAFE==1 call pppos_input() using tcpip_callback().
|
||||
*
|
||||
* Set this to 0 in the following cases:
|
||||
* - pppos_input() is called from the main loop and NO_SYS==1
|
||||
* - you are using tcpip_input() (NO_SYS==0) on PPP data input
|
||||
*
|
||||
* Otherwise, if pppos_input() is called outside lwIP context (IRQ)
|
||||
* set this to 1.
|
||||
*
|
||||
* CAUTION: if set to 1, you should NEVER call pppos_connect(), pppos_listen()
|
||||
* and ppp_free() if pppos_input() can still be running, doing this is not
|
||||
* thread safe. You should also avoid calling pppos_input() if PPPoS session
|
||||
* is not started yet.
|
||||
* Please read the "PPPoS input path" chapter in the PPP documentation about this option.
|
||||
*/
|
||||
#ifndef PPP_INPROC_MULTITHREADED
|
||||
#define PPP_INPROC_MULTITHREADED 0
|
||||
#ifndef PPP_INPROC_IRQ_SAFE
|
||||
#define PPP_INPROC_IRQ_SAFE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,9 +143,9 @@ err_t tcpip_apimsg(struct api_msg *apimsg);
|
||||
|
||||
err_t tcpip_input(struct pbuf *p, struct netif *inp);
|
||||
|
||||
#if PPPOS_SUPPORT && !PPP_INPROC_MULTITHREADED
|
||||
#if PPPOS_SUPPORT && !PPP_INPROC_IRQ_SAFE
|
||||
err_t tcpip_pppos_input(struct pbuf *p, struct netif *inp);
|
||||
#endif /* PPPOS_SUPPORT && !PPP_INPROC_MULTITHREADED */
|
||||
#endif /* PPPOS_SUPPORT && !PPP_INPROC_IRQ_SAFE */
|
||||
|
||||
#if LWIP_NETIF_API
|
||||
err_t tcpip_netifapi(struct netifapi_msg *netifapimsg);
|
||||
@@ -182,9 +182,9 @@ enum tcpip_msg_type {
|
||||
TCPIP_MSG_API,
|
||||
#endif /* LWIP_NETCONN || LWIP_SOCKET */
|
||||
TCPIP_MSG_INPKT,
|
||||
#if PPPOS_SUPPORT && !PPP_INPROC_MULTITHREADED
|
||||
#if PPPOS_SUPPORT && !PPP_INPROC_IRQ_SAFE
|
||||
TCPIP_MSG_INPKT_PPPOS,
|
||||
#endif /* PPPOS_SUPPORT && !PPP_INPROC_MULTITHREADED */
|
||||
#endif /* PPPOS_SUPPORT && !PPP_INPROC_IRQ_SAFE */
|
||||
#if LWIP_NETIF_API
|
||||
TCPIP_MSG_NETIFAPI,
|
||||
#endif /* LWIP_NETIF_API */
|
||||
|
||||
@@ -104,10 +104,10 @@ struct pppos_pcb_s {
|
||||
ppp_pcb *pppos_create(struct netif *pppif, sio_fd_t fd,
|
||||
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
|
||||
|
||||
#if !NO_SYS && !PPP_INPROC_MULTITHREADED
|
||||
#if !NO_SYS && !PPP_INPROC_IRQ_SAFE
|
||||
/* Pass received raw characters to PPPoS to be decoded through lwIP TCPIP thread. */
|
||||
err_t pppos_input_tcpip(ppp_pcb *ppp, u8_t *s, int l);
|
||||
#endif /* !NO_SYS && !PPP_INPROC_MULTITHREADED */
|
||||
#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */
|
||||
|
||||
/* PPP over Serial: this is the input function to be called for received data. */
|
||||
void pppos_input(ppp_pcb *ppp, u8_t* data, int len);
|
||||
@@ -117,9 +117,9 @@ void pppos_input(ppp_pcb *ppp, u8_t* data, int len);
|
||||
* Functions called from lwIP
|
||||
* DO NOT CALL FROM lwIP USER APPLICATION.
|
||||
*/
|
||||
#if !NO_SYS && !PPP_INPROC_MULTITHREADED
|
||||
#if !NO_SYS && !PPP_INPROC_IRQ_SAFE
|
||||
err_t pppos_input_sys(struct pbuf *p, struct netif *inp);
|
||||
#endif /* !NO_SYS && !PPP_INPROC_MULTITHREADED */
|
||||
#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */
|
||||
|
||||
#endif /* PPPOS_H */
|
||||
#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */
|
||||
|
||||
Reference in New Issue
Block a user