From Using the FreeRTOS Real Time Kernel - Standard Edition, p143, I noticed that:
int types are never used – only long and short
I would like to know why, but I find no answer in its official site and no result after google.
Update 08/31:
Maybe my question is not so clear, in short, I just wonder that why FreeRTOS defines BaseType_t
as long
instead of int
(and other FreeRTOS defined types are never use int
, too). From its Coding-Standard-and-Style-Guide page, it said that:
BaseType_t
This is defined to be the most efficient, natural, type for the architecture. For example, on a 32-bit architecture BaseType_t will be defined to be a 32-bit type. On a 16-bit architecture BaseType_t will be defined to be a 16-bit type. If BaseType_t is define to char then particular care must be taken to ensure signed chars are used for function return values that can be negative to indicate an error.
From the above description, I think int
is more suitable than long
, since int
is always conform to the architecture's word size.