the following errors when building:
E163: ["..FreeRTOS_Sourcequeue.c" 1171/24] "uxQueueMessagesWaiting" redeclared with a different type
I459: ["..FreeRTOS_Sourceinclude/queue.h" 796/24] previous declaration of "uxQueueMessagesWaiting"
E163: ["..FreeRTOS_Sourcequeue.c" 1614/7] "vQueueAddToRegistry" redeclared with a different type
I459: ["..FreeRTOS_Sourceinclude/queue.h" 1283/7] previous declaration of "vQueueAddToRegistry"
E163: ["..FreeRTOS_Sourceinclude/queue.h" 1293/6] "vQueueWaitForMessageRestricted" redeclared with a different type
I459: ["..FreeRTOS_Sourcequeue.c" 1660/7] previous declaration of "vQueueWaitForMessageRestricted"
E163: ["..FreeRTOS_Sourcequeue.c" 555/15] "xQueueCreateCountingSemaphore" redeclared with a different type
I459: ["..FreeRTOS_Sourceinclude/queue.h" 1244/14] previous declaration of "xQueueCreateCountingSemaphore"
E163: ["..FreeRTOS_Sourcequeue.c" 324/14] "xQueueGenericCreate" redeclared with a different type
I459: ["..FreeRTOS_Sourceinclude/queue.h" 1290/14] previous declaration of "xQueueGenericCreate"
E163: ["..FreeRTOS_Sourceinclude/queue.h" 1103/22] "xQueueGenericSendFromISR" redeclared with a different type
I459: ["..FreeRTOS_Sourcequeue.c" 906/22] previous declaration of "xQueueGenericSendFromISR"
E163: ["..FreeRTOS_Sourcequeue.c" 466/16] "xQueueGiveMutexRecursive" redeclared with a different type
I459: ["..FreeRTOS_Sourceinclude/queue.h" 1252/15] previous declaration of "xQueueGiveMutexRecursive"
To treat the following error
E163: ["..FreeRTOS_Sourceportable....port.c" 102/35] "pxCurrentTCB" redeclared with a different type
I459: ["..FreeRTOS_Sourcetasks.c" 111/35] previous declaration of "pxCurrentTCB"
I’ve already submitted a patch.
Now to the problems in queue.c:
I think in queue.c, e.g., the “typedef xQUEUE * xQueueHandle;” should berenamed “typedef xQUEUE * xKernelQueueHandle;”. Then queue.c can safely include queue.h and the queue handle can then be
treated as follows, using uxQueueMessagesWaiting( ) as example:
unsigned portBASE_TYPE uxQueueMessagesWaiting( const xQueueHandle pxQueue )
{
unsigned portBASE_TYPE uxReturn;
configASSERT( pxQueue );
taskENTER_CRITICAL();
uxReturn = ((xKernelQueueHandle *)pxQueue)->uxMessagesWaiting;
taskEXIT_CRITICAL();
return uxReturn;
}
And functions returning a queue handle should be treated as follows:
xKernelQueueHandle xReturn = NULL;
....
return (xQueueHandle)xReturn;
What do you think?
RegardsFriedl