userspace: clarify memory domain assertions
Some text added to help explain what is going on. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
8207801c9b
commit
475d279382
|
@ -100,7 +100,9 @@ void k_mem_domain_init(struct k_mem_domain *domain, u8_t num_parts,
|
|||
for (i = 0U; i < num_parts; i++) {
|
||||
__ASSERT(parts[i] != NULL, "");
|
||||
__ASSERT((parts[i]->start + parts[i]->size) >
|
||||
parts[i]->start, "");
|
||||
parts[i]->start,
|
||||
"invalid partition %p size %d",
|
||||
parts[i], parts[i]->size);
|
||||
|
||||
#if defined(CONFIG_EXECUTE_XOR_WRITE) || \
|
||||
defined(CONFIG_MPU_REQUIRES_NON_OVERLAPPING_REGIONS)
|
||||
|
@ -153,7 +155,8 @@ void k_mem_domain_add_partition(struct k_mem_domain *domain,
|
|||
|
||||
__ASSERT(domain != NULL, "");
|
||||
__ASSERT(part != NULL, "");
|
||||
__ASSERT((part->start + part->size) > part->start, "");
|
||||
__ASSERT((part->start + part->size) > part->start,
|
||||
"invalid partition %p size %d", part, part->size);
|
||||
|
||||
#if defined(CONFIG_EXECUTE_XOR_WRITE) || \
|
||||
defined(CONFIG_MPU_REQUIRES_NON_OVERLAPPING_REGIONS)
|
||||
|
@ -208,7 +211,7 @@ void k_mem_domain_remove_partition(struct k_mem_domain *domain,
|
|||
}
|
||||
|
||||
/* Assert if not found */
|
||||
__ASSERT(p_idx < max_partitions, "");
|
||||
__ASSERT(p_idx < max_partitions, "no matching partition found");
|
||||
|
||||
/* Handle architecture-specific remove
|
||||
* only if it is the current thread.
|
||||
|
|
Loading…
Reference in a new issue