Hi all,
in my c6678 NDK program, I have 2 tasks. At some point, one of them is in a loop like this:
while (continue())
;
while the second task is receiving data from a TCP socket:
while(1)
{
i = (int)recvnc(...);
...
// Depending on the received data, my continue() function may return 0.
}
The problem is that I never receive data on the second task. In fact, wireshark shows me that the packets sent to the
board are being resent because no ACK is given from NDK. It seems to me that, since a thread is saturated with the "while(continue()) ;"
NDK cannot work properly.
So, I would like to change it to something like:
while (continue())
Sleep_microseconds(50);
However, I cannot find any sleep function in the documentation. All I have found in the examples is TaskSleep, but it seems to work
only with times above the millisecond. Is there a sleep function which I can use to wait for a specified number of microseconds, allowing NDK to do its part properly?
Thanks