Submitting Modifications

richard_damon wrote on Sunday, October 28, 2007:

What is the procedure for submitting ideas/code for minor updates?

I am using FreeRTOS in a project using C++ and to get it to compile as a C routine, I need to add

#ifdef __cplusplus
extern "C" {
#endif

and

#ifdef __cplusplus
}
#endif

bracketing the definitions in include files.

In addition I change a few of the opaque type from

typedef void * xQueueHandle

to

typedef struct QueueDefinition * xQueueHandle;

which gets around some warnings on inconsistent types, while still keeping the definition opaque (since the struct definition is still not visable).

I would think these are reasonable changes to make in the code base for a future release.

rtel wrote on Monday, October 29, 2007:

Hi Richard,

Thanks for your suggestions.

With reference to the ‘extern “C”’ inclusion.  I will add this into the next release (due in a couple of weeks or so).  Could you send me your modified files so I get their positioning correct - I think they just need to be placed at the top and bottom of the header files but as I don’t have any C++ projects setup I cannot test this.  Please send the files to r _dot_ barry (at) freertos.org.

With reference to the void * used for the queue and task handles.  You are right - this is a pain.  Unfortunately it has to be done this way because it is the only method I have found that will happily go through all the various compilers that FreeRTOS.org is built with.  The method suggested by yourself breaks the build with at least one compiler - from memory I think this is the C18 compiler from Microchip.

Thanks and regards.