PPP, PPPoS, PPP_INPROC_MULTITHREADED defaults to 0, explain thread safety issue with it

This commit is contained in:
Sylvain Rochet
2015-03-11 01:20:53 +01:00
parent 9778b1411c
commit 4b035b9902
2 changed files with 21 additions and 5 deletions

View File

@@ -556,8 +556,14 @@ PACK_STRUCT_END
#endif
#endif /* PPP_INPROC_MULTITHREADED */
/** Pass received raw characters to PPPoS to be decoded. This function is
* thread-safe and can be called from a dedicated RX-thread or from a main-loop.
/** Pass received raw characters to PPPoS to be decoded.
*
* This function is thread-safe if PPP_INPROC_MULTITHREADED is set to 1
* and can be called from a dedicated RX-thread or from interrupt context
* BUT 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.
*
* @param pcb PPP descriptor index, returned by ppp_new()
* @param data received data