[Top][All Lists]

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

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

From: Tom C. Barker
Subject: RE: [lwip-users] critical section protection + timer issues
Date: Mon, 21 Feb 2005 09:36:56 -0800

I hope this helps at least part of what you are dealing with. I have one and only
one thread that runs the stack, timers, etc. In order to get myself into the stack
so as to have the stack "establish a TCP connection on behalf of an
arbitrary thread" I call tcpip_callback(void (*f)(void *ctx), void *ctx) in
tcpip.c. The callback then gives me, under the lwIP thread, execution time for
arbitrary _code_ which wants to establish a tcp connection. (tcpip_callback can
be done from any thread since it is interacting with your thread-safe message box.)
As long as all sockets are initialized in the lwip thread directly or are executed via
a callback to the lwip thread, your tcp timer will always run under the one lwIP thread.

reply via email to

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