|
From: | Brian McFarland |
Subject: | Re: [lwip-users] LwIP 1.3.1 - Using tcp_write() outside of 'rawapi' callback context? |
Date: | Fri, 18 Nov 2011 12:08:20 -0500 |
So if I want to do this without message
queues, I essentially I need a mutex around any calls into lwip from both the
network task and the background worker task? From:
address@hidden
[mailto:address@hidden On Behalf Of Simon Goldschmidt "Brian McFarland" <address@hidden>
wrote:
No.
Thats one possibility, but blocking the network task is not enough: you
also would have to ensure that you haven't interrupted it while it's inside the
lwIP code somewhere. Or would it
be safer/better to have queues going both ways to where the network task main
loop checks for pending calls to tcp_write()? And that's the 2nd possibility, which is implemented by our API layer,
BTW (e.g. by calling tcpip_callback). Both possibilities work fine, it's up to you which one you like best. Simon |
[Prev in Thread] | Current Thread | [Next in Thread] |