Fixed the bug #B3.1

posted Oct 13, 2008, 3:09 AM by Stefano Oliveri   [ updated Oct 13, 2008, 3:22 AM ]
The problem was found in the source file port.c. To fix the problem without modifying the kernel source code, I added a new extension API function:
xTaskCreateEx( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxMode, xTaskHandle *pxCreatedTask)

To mix tasks compiled in ARM and THUMB mode, use this new function instead of the standard xTaskCreate. The extended function uses a new input parameter - uxMode - to provide to the scheduler additional information about the task entry function. It calls the standard xTaskCreate and than modifies the initial task stack if it is necessary.