mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Define default values of macros before first use (#298)
configSTACK_ALLOCATION_FROM_SEPARATE_HEAP was added recently in https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/267. This macro was used in portable.h before its default value was defined, resulting in a warning when built with -Wundef. This changes moves the default value definition for configSTACK_ALLOCATION_FROM_SEPARATE_HEAP to portable.h to ensure that it is defined before first use. portUSING_MPU_WRAPPERS check in mpu_wrappers.h was updated in https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/285. The new check results in a warning when built with -Wundef because portUSING_MPU_WRAPPERS is not defined yet. This changes adds the default value definition for portUSING_MPU_WRAPPERS to portable.h to ensure that it is defined before first use. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
534eba66ce
commit
b08c19f745
|
@ -896,11 +896,6 @@
|
||||||
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
|
|
||||||
/* Defaults to 0 for backward compatibility. */
|
|
||||||
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef configSTACK_DEPTH_TYPE
|
#ifndef configSTACK_DEPTH_TYPE
|
||||||
|
|
||||||
/* Defaults to uint16_t for backward compatibility, but can be overridden
|
/* Defaults to uint16_t for backward compatibility, but can be overridden
|
||||||
|
|
|
@ -177,7 +177,6 @@
|
||||||
#define PRIVILEGED_FUNCTION
|
#define PRIVILEGED_FUNCTION
|
||||||
#define PRIVILEGED_DATA
|
#define PRIVILEGED_DATA
|
||||||
#define FREERTOS_SYSTEM_CALL
|
#define FREERTOS_SYSTEM_CALL
|
||||||
#define portUSING_MPU_WRAPPERS 0
|
|
||||||
|
|
||||||
#endif /* portUSING_MPU_WRAPPERS */
|
#endif /* portUSING_MPU_WRAPPERS */
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,10 @@
|
||||||
#error "Invalid portBYTE_ALIGNMENT definition"
|
#error "Invalid portBYTE_ALIGNMENT definition"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef portUSING_MPU_WRAPPERS
|
||||||
|
#define portUSING_MPU_WRAPPERS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef portNUM_CONFIGURABLE_REGIONS
|
#ifndef portNUM_CONFIGURABLE_REGIONS
|
||||||
#define portNUM_CONFIGURABLE_REGIONS 1
|
#define portNUM_CONFIGURABLE_REGIONS 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -91,6 +95,11 @@
|
||||||
#define portARCH_NAME NULL
|
#define portARCH_NAME NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
|
||||||
|
/* Defaults to 0 for backward compatibility. */
|
||||||
|
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
Loading…
Reference in a new issue