kernel: remove MEM_PARTITION_ENTRY macro
MEM_PARTITION_ENTRY is problematic, as it assumes that struct k_mem_partition contains a k_mem_partition_attr_t field, which is only true if Memory Protection is supported. Additionally, it works with k_mem_partition_attr_t being a single element object (scalar or single element structure). This commit removes the macro function and updates macro K_MEM_PARTITION_DEFINE() (MEM_PARTITION_ENTRY has only been used in that macro function definition). Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
5cc08cbeae
commit
293247e879
|
@ -4759,18 +4759,6 @@ static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def MEM_PARTITION_ENTRY
|
||||
* @brief Used to declare a memory partition entry
|
||||
* @req K-MP-001
|
||||
*/
|
||||
#define MEM_PARTITION_ENTRY(_start, _size, _attr) \
|
||||
{\
|
||||
.start = _start, \
|
||||
.size = _size, \
|
||||
.attr = _attr, \
|
||||
}
|
||||
|
||||
/**
|
||||
* @def K_MEM_PARTITION_DEFINE
|
||||
* @brief Used to declare a memory partition
|
||||
|
@ -4780,11 +4768,11 @@ static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
#define K_MEM_PARTITION_DEFINE(name, start, size, attr) \
|
||||
_ARCH_MEM_PARTITION_ALIGN_CHECK(start, size); \
|
||||
__kernel struct k_mem_partition name =\
|
||||
MEM_PARTITION_ENTRY((u32_t)start, size, attr)
|
||||
{ (u32_t)start, size, attr}
|
||||
#else
|
||||
#define K_MEM_PARTITION_DEFINE(name, start, size, attr) \
|
||||
__kernel struct k_mem_partition name =\
|
||||
MEM_PARTITION_ENTRY((u32_t)start, size, attr)
|
||||
{ (u32_t)start, size, attr}
|
||||
#endif /* _ARCH_MEM_PARTITION_ALIGN_CHECK */
|
||||
|
||||
/* memory partition */
|
||||
|
|
Loading…
Reference in a new issue