lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP infinite loop - system watchdog implementation


From: address@hidden
Subject: Re: [lwip-users] LWIP infinite loop - system watchdog implementation
Date: Thu, 24 Apr 2008 18:22:06 +0200
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

Piero 74 wrote:
LWIP has its task (tcpip thread - i'm using socket), and i saw that this task can block forever trought functions in sys_arch.c sys_arch_sem_wait and sys_arch_mbox_fetch. I implemented these functions putting a macro functions inside a infinite loop (execute if timeout parameter is 0).
Why don't you simply use sys_timeout to get your triggering function called periodically? It puts a callback on a list which is processed by sys_sem_wait() before calling sys_arch_sem_wait(). Normally, sys_arch_sem_wait() will never be called with infinite timeout from tcpip_thread, there are always timeouts running. Look at tcpip.c for examples how to use it.


Simon




reply via email to

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