Prefix of size_t variables

In the FreeRTOS doging guide, I read that:

  • Unsigned variables of non stdint types have an additional prefix u. For example, variables of type UBaseType_t (unsigned BaseType_t) are prefixed ux.

  • Variables of type size_t are also prefixed x.

Isn’t that a typo, the prefix x, shouldn’t that be ux?

size_t is an unsigned type, so shouldn’t it be:

size_t uxIndex;

I am asking this because of PR #1065, in which we had doubt about the correct name. I vote for the ux prefix.

This would be correct but very confusing:

    size_t xIndex;
    if( xIndex < 12U )

FreeRTOS uses an x, whereas the FreeRTOS libraries use an ux for variables of type size_t.

I agree with you that size_t should be prefixed ux since you are right, it is an unsigned non stdint type. I will ask the internal team just to make sure.


Jason Carroll