|
From: | Timmy Brolin |
Subject: | Re: [lwip-users] OS-less Active Web Server with RAW API. |
Date: | Fri, 09 Jul 2004 01:04:48 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
Leon Woestenberg wrote:
Hello,Why not simply set up a timer interrupts to call tcp_fasttmr() and tcp_slowtmr() ?That's how I do it.You could do that, but the interrupt should not pre-empt the running program while it is inside the lwIP functions, as this will lead to race conditions and/or concurrency induced crashes.Leon.
Of course.You just disable the timer interrupts during incomming/outgoing packet processing, and you disable transmit/recieve interrupts during tcp_tmr processing. Or you can just disable interrupts globally during lwip processing, unless you have other high-priority interrupts that cannot be delayed.
The advantage of using interrupts it that you are free to do whatever you want in the main loop while lwip runs happily in the background.
Timmy
[Prev in Thread] | Current Thread | [Next in Thread] |