Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 带有宏标识符的FreeRTOS静态数组声明_C_Macros_Declaration_Freertos - Fatal编程技术网

C 带有宏标识符的FreeRTOS静态数组声明

C 带有宏标识符的FreeRTOS静态数组声明,c,macros,declaration,freertos,C,Macros,Declaration,Freertos,我正在从零开始学习FreeRTOS。为了做到这一点,首先,我开始研究Task.c文件。 该文件中有宏、函数和声明 但我对声明的含义感到困惑,我不明白为什么? 在task.c中,特权_数据的使用方式如下 PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks.*/ 在FreeRTOSConfig.h中 #define configMAX_PRIOR

我正在从零开始学习FreeRTOS。为了做到这一点,首先,我开始研究Task.c文件。 该文件中有宏、函数和声明

但我对声明的含义感到困惑,我不明白为什么? 在task.c中,特权_数据的使用方式如下

PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks.*/
在FreeRTOSConfig.h中

#define configMAX_PRIORITIES                    5

如果这只是一个简单的C代码,那么宏就是一种文档。当代码从前置符传递时,宏将展开为空

然而,在freertos中,这个宏是用来帮助MPU的。您可以在这里阅读更多内容:

显然,这是一本书。也许有一个不同的include路径可以用更有意义的内容替换这个宏。
#define configMAX_PRIORITIES                    5