« Return to Thread: UDP socket thread safe problem

Re: UDP socket thread safe problem - arp proccess error if ARP_QUEUEING 1

by Darius Babrauskas :: Rate this Message:

| View in Thread

Thank you, Simon.

Darius

----- Original Message -----
From: "Simon Goldschmidt" <goldsimon@...>
To: "Mailing list for lwIP users" <lwip-users@...>
Sent: Friday, March 23, 2012 3:12 PM
Subject: Re: [lwip-users] UDP socket thread safe problem - arp proccess
error if ARP_QUEUEING 1


> "Darius Babrauskas" <darius@...> wrote:
>> But how raw api? It must working in  tcpip_thread context?
>> In LWIP 1.2v  my aplication main task   using  udp_sendto  function,
>> which
>> internaly use etharp_output,  which use  etharp_query which using not
>> protected ARP table.
>> So problem leave same.  2 task using  one not protected APR table.
>
> No, both your lwIP port and your application have to ensure you are not
> using lwIP from more than one contexs at the same time (where context
> means thread or ISR). How you do this is up to you: you can use a mutex or
> process RX packets and timers from the same main loop that eventually
> calls udp_output().
>
> Thread-safety is not something which is provided by lwIP itself: the
> developer creating the port or application is free to chose which type of
> concurrency protection he wants to use.
>
> Simon
> --
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@...
> https://lists.nongnu.org/mailman/listinfo/lwip-users 


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

 « Return to Thread: UDP socket thread safe problem