mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 06:36:51 +08:00
PPP, PPPoS, PPP_INPROC_MULTITHREADED defaults to 0, explain thread safety issue with it
This commit is contained in:
@@ -1917,11 +1917,21 @@
|
||||
|
||||
/**
|
||||
* PPP_INPROC_MULTITHREADED==1 call ppp_input() using tcpip_callback().
|
||||
* Set this to 0 if pppos_input() is called inside tcpip_thread or with NO_SYS==1.
|
||||
* Default is 1 for NO_SYS==0 (multithreaded) and 0 for NO_SYS==1 (single-threaded).
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
#ifndef PPP_INPROC_MULTITHREADED
|
||||
#define PPP_INPROC_MULTITHREADED (NO_SYS==0)
|
||||
#define PPP_INPROC_MULTITHREADED 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user