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: Wed, 10 Sep 2008 06:48:13 +0200
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Nick Thomas wrote:
Hi, Well I made some progress.
I added the array of task structs, and an array of struct sys_timeouts as
suggested to sys_arch.c. This has improved things immensely.
Gald to hear that.
But, there is still an anomaly.

The first sys_timeout() call is done from the 'root' thread, which isn't
created by any of the task_create functions in sys_arch.c.
So, when sys_arch_timeouts() loops through to find the appropriate task
struct, it doesn't find one!

For now, if it fails to find the right array, it simply defaults to the
first in the list. This is better than returning NULL as the timeout
handlers would never be called for that timer.

There must be a better way though!
That better way would be to find out why sys_timeout is called from the root thread. This shouldn't normally be the case (although if you are using ppp, I cannot say for sure - however this is wrong). If it is an init function, you should try to call it from tcpip_thread.

Simon




reply via email to

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