From 873dd10ea4ce62e83f40f01e988df686b892be54 Mon Sep 17 00:00:00 2001 From: Ioannis Glaropoulos Date: Thu, 2 May 2019 10:00:30 +0200 Subject: [PATCH] kernel: mem_domain: update name/doc of API function for partition add Update the name of mem-domain API function to add a partition so that it complies with the 'z_' prefix convention. Correct the function documentation. Signed-off-by: Ioannis Glaropoulos --- arch/arc/core/mpu/arc_core_mpu.c | 2 +- arch/arm/core/cortex_m/mpu/arm_core_mpu.c | 2 +- arch/x86/core/x86_mmu.c | 4 ++-- kernel/include/kernel_internal.h | 4 ++-- kernel/mem_domain.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arc/core/mpu/arc_core_mpu.c b/arch/arc/core/mpu/arc_core_mpu.c index 4eef9d49332..383e4bdb4ae 100644 --- a/arch/arc/core/mpu/arc_core_mpu.c +++ b/arch/arc/core/mpu/arc_core_mpu.c @@ -62,7 +62,7 @@ void z_arch_mem_domain_destroy(struct k_mem_domain *domain) arc_core_mpu_enable(); } -void _arch_mem_domain_partition_add(struct k_mem_domain *domain, +void z_arch_mem_domain_partition_add(struct k_mem_domain *domain, u32_t partition_id) { /* No-op on this architecture */ diff --git a/arch/arm/core/cortex_m/mpu/arm_core_mpu.c b/arch/arm/core/cortex_m/mpu/arm_core_mpu.c index c8cf550c809..4a380a79467 100644 --- a/arch/arm/core/cortex_m/mpu/arm_core_mpu.c +++ b/arch/arm/core/cortex_m/mpu/arm_core_mpu.c @@ -331,7 +331,7 @@ void z_arch_mem_domain_partition_remove(struct k_mem_domain *domain, &domain->partitions[partition_id], &reset_attr); } -void _arch_mem_domain_partition_add(struct k_mem_domain *domain, +void z_arch_mem_domain_partition_add(struct k_mem_domain *domain, u32_t partition_id) { /* No-op on this architecture */ diff --git a/arch/x86/core/x86_mmu.c b/arch/x86/core/x86_mmu.c index d699d2ae67b..fec1e9d9233 100644 --- a/arch/x86/core/x86_mmu.c +++ b/arch/x86/core/x86_mmu.c @@ -335,8 +335,8 @@ void z_arch_mem_domain_partition_remove(struct k_mem_domain *domain, z_x86_reset_pages((void *)partition->start, partition->size); } -/* Reset/destroy one partition specified in the argument of the API. */ -void _arch_mem_domain_partition_add(struct k_mem_domain *domain, +/* Add one partition specified in the argument of the API. */ +void z_arch_mem_domain_partition_add(struct k_mem_domain *domain, u32_t partition_id) { struct k_mem_partition *partition; diff --git a/kernel/include/kernel_internal.h b/kernel/include/kernel_internal.h index 9df0297cf3c..912c1a0c0ba 100644 --- a/kernel/include/kernel_internal.h +++ b/kernel/include/kernel_internal.h @@ -94,7 +94,7 @@ extern void z_arch_mem_domain_partition_remove(struct k_mem_domain *domain, u32_t partition_id); /** - * @brief Remove a partition from the memory domain + * @brief Add a partition to the memory domain * * A memory domain contains multiple partitions and this API provides the * freedom to add an additional partition to a memory domain. @@ -104,7 +104,7 @@ extern void z_arch_mem_domain_partition_remove(struct k_mem_domain *domain, * @param domain The memory domain structure * @param partition_id The partition that needs to be added */ -extern void _arch_mem_domain_partition_add(struct k_mem_domain *domain, +extern void z_arch_mem_domain_partition_add(struct k_mem_domain *domain, u32_t partition_id); /** diff --git a/kernel/mem_domain.c b/kernel/mem_domain.c index 937131d65db..461a0398cb4 100644 --- a/kernel/mem_domain.c +++ b/kernel/mem_domain.c @@ -181,11 +181,11 @@ void k_mem_domain_add_partition(struct k_mem_domain *domain, domain->num_partitions++; - /* Handle architecture-specific remove + /* Handle architecture-specific add * only if it is the current thread. */ if (_current->mem_domain_info.mem_domain == domain) { - _arch_mem_domain_partition_add(domain, p_idx); + z_arch_mem_domain_partition_add(domain, p_idx); } k_spin_unlock(&lock, key);