Ueli Niederer <[email protected]> wrote:
>    - Am I missing something if I wrap every tcp_*-call and the  
> relevant portions of a callback in SYS_ARCH_PROTECT/SYS_ARCH_UNPROTECT  
> calls if I want to cross a context border?

In your scenario below (where the input and timer processing is effectively 
locked, already, since it runs in the ISR context that you protect from, I 
assume), it should suffice to lock interrupts for all calls into the stack 
(i.e. tcp_write, etc.). This assumes that the stellaris netif driver can handle 
this correctly.

>    - Is it correct, that pbuf_*-calls and memp_*-calls are already  
> constructed thread-safe?

Partly. Allocation/deallocation and pbuf_ref() are safe as long as 
SYS_ARCH_PROTECT is implemented correctly and enabled, they should be safe to 
use from ISR vs. application level. Other functions like pbuf_header() are not 
safe, but in your scenario, that should be OK.

In general, it would be a better idea to enqueue RX packets for processing at 
application level, though, so that lwIP runs completely at application level.

Simon
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to