This question already has an answer here:
I'm a complete newbie in RTOS and C programming, and I'm still getting used to the C good practices yet. So I opened a project which uses FreeRTOS, and I notice that the OS files use the Hungarian Notation. I know the notation a little, but faced some new "standards" in the FreeRTOS.h
file, which are:
#ifndef configASSERT
#define configASSERT( x )
#define configASSERT_DEFINED 0
#else
#define configASSERT_DEFINED 1
#endif
And below that,
#ifndef INCLUDE_xTaskGetSchedulerState
#define INCLUDE_xTaskGetSchedulerState 0
#endif
#ifndef INCLUDE_xTaskGetCurrentTaskHandle
#define INCLUDE_xTaskGetCurrentTaskHandle 0
#endif
I've seen this x - as in xTaskGetCurrentTaskHandle - everywhere. Also, v, pd and variable names like that, like in line 728
of the header in question:
#if configENABLE_BACKWARD_COMPATIBILITY == 1
#define eTaskStateGet eTaskGetState
#define portTickType TickType_t
#define xTaskHandle TaskHandle_t
#define xQueueHandle QueueHandle_t
#define xSemaphoreHandle SemaphoreHandle_t
#define xQueueSetHandle QueueSetHandle_t
#define xQueueSetMemberHandle QueueSetMemberHandle_t
#define xTimeOutType TimeOut_t
#define xMemoryRegion MemoryRegion_t
#define xTaskParameters TaskParameters_t
#define xTaskStatusType TaskStatus_t
#define xTimerHandle TimerHandle_t
#define xCoRoutineHandle CoRoutineHandle_t
#define pdTASK_HOOK_CODE TaskHookFunction_t
#define portTICK_RATE_MS portTICK_PERIOD_MS
/* Backward compatibility within the scheduler code only - these definitions
are not really required but are included for completeness. */
#define tmrTIMER_CALLBACK TimerCallbackFunction_t
#define pdTASK_CODE TaskFunction_t
#define xListItem ListItem_t
#define xList List_t
I've searched everywhere what would those "initials" stand for, but still could not figure that out.
So, if anyone could help me to understand this, or could show me a path or something, I'd be really grateful.
Looking at the man
Emphasis mine
Emphasis mine
Emphasis mine