Hi!

When I upgraded from LwIP 1.3.2 to 1.4.0 I had to make some changes in the port, as a tip for others:
http://lwip.wikia.com/wiki/Porting_for_an_OS_1.4.0
http://lwip.wikia.com/wiki/Writing_a_device_driver

However, it was crashing and the real cause of the problem could not be found easily with the embedded debugger. I went thru my port several times and added all sorts of checks. After a while I found out that the problem seemed to be related to the sockets interface.

In the end of event_callback() when it has gone thru all tasks waiting for a select() it unprotects&protects and starts over from the beginning. At this point the sock->select_waiting was sometimes zero and the loop crashed.


In lwip_select() there are protections when adding/removing from list and increasing/decreasing sock->select_waiting counters but they are not in sync. How good idea is it to pass a local variable to another task, there might be context switching in between? I might have a stack overflow or something going on...


Sincerely, Matias

--
mat!as


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

Reply via email to