FreeRTOS before the 8.0.0 version have a xTaskCreate function
with task name parameter of type const signed char*. So the name has
to be casted to this type to avoid warnings.
There is used a macro for it, because we might want to use different
versions of the FreeRTOS, which have different data type for the name
parameter.
Look for the FREERTOS_TASK_NAME definition in os/os.h file.
This commit refs: #1021
Signed-off-by: Michal Horn <hornmich@fel.cvut.cz>
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
{
xTaskHandle *pvCreatedTask = NULL;
- if(xTaskCreate(thread, (const signed char *) name, (unsigned short)stacksize, arg, prio, pvCreatedTask) != pdPASS)
+ if(xTaskCreate(thread, FREERTOS_TASK_NAME(name), (unsigned short)stacksize, arg, prio, pvCreatedTask) != pdPASS)
return NULL; /* lwIP doesn't specify, how should be informed that thread creation failed */
return pvCreatedTask;
}