On 25 Oct 2011, at 19:42, Dittrich, Matthew wrote:

> I can assure you I am not in the stack from different threads.  I am using 
> the raw API in order to avoid creating a task per connection. My Ethernet 
> task loop consists of a "handle_packets()", see below, netif->input is 
> ethernet_input().  low_level_input() returns a PBUF_RAW from PBUF_POOL. Then 
> sys_check_timeouts() is run, then my app level "monitor_events()" is run, 
> this watches a FreeRTOS queue that the other app tasks put messages into for 
> the ethernet task. The monitor_events() only makes tcp_writes() (no eth input 
> handling here) and only when we are not currently sending something else.  
> Then a FreeRTOS vTaskDelay(1) will pause the task until the next tick. Then 
> repeat the loop. No interrupts are involved.

It's not quite clear to me from this whether/how you are protecting against a 
received packet being handled by the stack (i.e. netif->input) at the same time 
as the application might be calling (e.g.) tcp_write().  If you're sure that is 
protected then that's good enough for me - the above suggests you have thought 
about this sort of thing - but I wanted to check to be sure.

I haven't had a chance to digest the rest of your email yet, but will as soon 
as I get the time.

Kieran
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to