lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] critical section protection + timer issues questions


From: Peter Graf
Subject: Re: [lwip-users] critical section protection + timer issues questions
Date: Fri, 18 Feb 2005 21:21:54 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Scott Taggart wrote:

> [Snip]
>
I do not want my threads to HAVE to call into the sys.c stuff JUST to get the LWIP timer stuff to function. As it is, I see no other work-around – because the LWIP timer stuff DEMANDs that all threads block in the previously mentioned 3 calls, I see no choice.

The lwIP timer implementation only requires a thread to use the lwIP specific sema/mailbox, where _this_ thread blocks on I/O through lwIP. You are free to block this thread using other methods at other times and places. You are also free to completely ignore the lwIP calls in threads that never use I/O through lwIP.

The only restriction is that you can not simply block for lwIP I/O and other I/O at the same time. If you have such a requirement, lwIP or the other I/O device needs to be polled. E.g. if you have a webbrowser which needs to block for keyboard input and for network packets. In such a case I block lwIP with a short timeout, poll the keyboard, then block lwIP again. Not elegant, but no noticable performance impact.

> I find this incredibly restrictive and arrogant – to presume that all
> threads on all o/ss must end up in some internal LWIP function call for
> the stack to work.

A more friendly tone might suit this friendly list better :-)

All the best
Peter




reply via email to

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