Hi everyone,
I'm trying to build an application that uses FreeRTOS and the lwip stack.
I'm using the MIMXRT1064-EVK with version 2.14.0 of the SDK.
Using getaddrinfo() in two tasks at the same time does not work correctly.
If I run freeaddrinfo() after getaddrinfo() in the first task, it works fine in the second task.
Is this behavior as specified?
If I want to use getaddrinfo() at the same time, is there no choice but to use a semaphore or mutex to guard it until freeaddrinfo()?
Thanks in advance.
Solved! Go to Solution.
Hi @atm2024,
This behavior is expected. This is the description that accompanies the function on the netdb.c file:
You can use the function in both tasks as long as you call the freeaddrinfo() function for each of the getaddrinfo() before trying to do another getaddrinfo() on the second task.
BR,
Edwin.
Hi @atm2024,
This behavior is expected. This is the description that accompanies the function on the netdb.c file:
You can use the function in both tasks as long as you call the freeaddrinfo() function for each of the getaddrinfo() before trying to do another getaddrinfo() on the second task.
BR,
Edwin.