userspace: fix k_mem_partition definition
This properly is defined against CONFIG_USERSPACE, not CONFIG_MEMORY_PROTECTION; memory domains are specifically part of the userspace feature and its associated data structures should not be used outside of it. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
00cdb597ff
commit
0652d926e3
1 changed files with 2 additions and 6 deletions
|
@ -27,7 +27,7 @@ typedef struct k_thread *k_tid_t;
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_MEMORY_PROTECTION
|
||||
#ifdef CONFIG_USERSPACE
|
||||
/**
|
||||
* @def K_MEM_PARTITION_DEFINE
|
||||
*
|
||||
|
@ -63,12 +63,7 @@ struct k_mem_partition {
|
|||
/** attribute of memory partition */
|
||||
k_mem_partition_attr_t attr;
|
||||
};
|
||||
#else
|
||||
/* To support use of IS_ENABLED for the APIs below */
|
||||
struct k_mem_partition;
|
||||
#endif /* CONFIG_MEMORY_PROTECTION */
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
/**
|
||||
* @brief Memory Domain
|
||||
*
|
||||
|
@ -111,6 +106,7 @@ extern struct k_mem_domain k_mem_domain_default;
|
|||
#else
|
||||
/* To support use of IS_ENABLED for the APIs below */
|
||||
struct k_mem_domain;
|
||||
struct k_mem_partition;
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue