nobody wrote on Monday, September 11, 2006:
Hi,
I need to make following thing:
First task is waiting on lwIP socket for commands, and second task is waiting on second lwIP socket.
When I get a "start sending" command on socket 1 (first task), I want to start sending data on socket 2 (second task).
And when I get a "stop sending" command, I want to stop sending data.
The question is:
If I use a global variable which is changed only by task 1, and read by task 2, do I need to use critical section? Changing a variable is probably done in one assembler command, am I right?(portCHAR on 32-bit ARM7)
Also, is there any better way to synchronize these two task? Semaphore doesnt fit well here I think, because I dont want the task 2 to take it, it only needs to read the flag to send or not.
Second question: is there any way not to block task when waiting on packet in lwIP? I want to send data continously and also check for commands from another side.
And third: can two tasks work with one lwip socket connection? For example: one sends and one waits for commands.
Please help ;]