Hi,
PROBLEM SOLVED :-)
As mentioned earlier by Sergio we should not call LwIP code from within
other threads.
I must call tcp_write and other functions from a separate thread. This
is the implementation.
My TCP stack has the highest task priority in the system. As a result
calling tcp_write or any other
LwIP function may cause unpredictable LwIP internal code problems.
I added taskENTER_CRITICAL(); and taskEXIT_CRITICAL();
Function calls to the portion of code that call tcp_write etc.. this
synchronizes the threads
Interaction and solved the problem I faced completely.
For example:
taskENTER_CRITICAL();
{
AvailableSpace = tcp_sndbuf(ts->pcb);
}
taskEXIT_CRITICAL();
Thanks for your insight.
BR,
Noam.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Sergio R. Caprile
Sent: Thursday, June 04, 2015 12:02 AM
To: [email protected]
Subject: Re: [lwip-users] memory leak ?
Tx: yes
Rx: if you free them properly then they shouldn't be scarce. Have you
tested this ?
I'm not familiar with lwIP under RTOS except that you must adhere to the
general rule of not calling the stack from different threads.
You should check your port with a known good application first. Try
echo, for example, or netio; both are available in the contrib tree (and
there is nice patch for netio sent by youknowho)
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users
************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses.
************************************************************************
************
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
************************************************************************************
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users