lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip lock


From: Kieran Mansley
Subject: Re: [lwip-users] lwip lock
Date: Tue, 22 Mar 2011 15:55:57 +0000

On Tue, 2011-03-22 at 16:41 +0100, Tazzari Davide wrote:
> 
> Anyone has ever seen such a problem?

It sounds like you're corrupting internal stack state by having more
than one thread active in lwIP's core at the same time.  This would also
explain tcpip_thread being stalled as it is probably stuck in a loop
iterating a corrupt list.

> Any suggestion on how to solve it?

Make sure that only one thread is active in lwIP at once.  This should
in your case be the tcpip_thread.  All other threads (including
interrupts) should make sure they're not calling directly into lwIP and
are instead queueing work for the tcpip_thread to perform for them.  If
you're using the sockets API then most of this will be done for you but
you still need to be careful; you can't use one socket in two different
thread for example.  Make sure your driver is interfacing to lwIP
correctly as that was a common source of porting errors.

Kieran




reply via email to

[Prev in Thread] Current Thread [Next in Thread]