lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] sys_timeout firing too often.


From: address@hidden
Subject: Re: [lwip-users] sys_timeout firing too often.
Date: Mon, 08 Sep 2008 18:05:29 +0200
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Nick, could you tell us which version of lwIP you are using? I think I remember the calls to sys_mbox_fetch in api_lib.c being changed to sys_arch_mbox_fetch in 1.3.0, so you might be using an old, pre-1.3.0 version?

As to the actual problem: your port must have something seriously messed up: I could imagine either sys_arch_timeouts() returning the same struct sys_timeouts* for all tasks (which is an error!) or your system time (used in sys_arch_mbox_fetch) is somehow calculated wrong... (the return value of sys_arch_mbox_fetch should indicate how long you have been waiting). I suspect the first, though.

However, the 'fix' you suggested is NOT a good solution since this could lead to a deadlock: image one thread is waiting on the receive-mbox of a netconn (which waits forever): tcpip_thread would block forever and couldn't process new packets! You really should check the two things described above!

Simon


Kieran Mansley wrote:
On Mon, 2008-09-08 at 15:47 +0100, Nick Thomas wrote:
sys_timeout firing too often - again.

I think this is because sys_mbox_fetch() is being called by two tasks, which
are tripping over each other.
There is a tcpip_thread (in tcpip.c) which keeps calling sys_mbox_thread()
in a while(1) loop, and there are lots of calls to sys_mbox_fetch() in
api_lib.c .

I don't see any calls to sys_mbox_fetch() in api_lib.c

Kieran



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users






reply via email to

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