From 193dd174d09b0bf3721e41b6bc94870d3a51db6f Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Wed, 8 Nov 2017 08:24:19 +0000 Subject: [PATCH] Rewrite some code according to glossary --- arch/pfa.c | 12 ++++++------ arch/pfa.h | 4 ++-- arch/tasks.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/pfa.c b/arch/pfa.c index a0413a6..6fd4ec8 100644 --- a/arch/pfa.c +++ b/arch/pfa.c @@ -75,11 +75,11 @@ unsigned long pfa_alloc_big_page() return 0; } -void pfa_free_page(const unsigned long addr) +void pfa_free_page(const unsigned long base) { - assert(!(addr % PAGE_SIZE), "Small page address to free is not aligned."); + assert(!(base % PAGE_SIZE), "Small page address to free is not aligned."); - const unsigned long i = addr / PAGE_SIZE; + const unsigned long i = base / PAGE_SIZE; if (i >= FRAMES_COUNT) { return; @@ -88,11 +88,11 @@ void pfa_free_page(const unsigned long addr) frames[i] = 0; } -void pfa_free_big_page(const unsigned long addr) +void pfa_free_big_page(const unsigned long base) { - assert(!(addr % PAGE_BIG_SIZE), "Big page address to free is not aligned."); + assert(!(base % PAGE_BIG_SIZE), "Big page address to free is not aligned."); - const unsigned long start = addr / PAGE_SIZE; + const unsigned long start = base / PAGE_SIZE; const unsigned long end = start + PAGE_BIG_SIZE / PAGE_SIZE; for (unsigned int i = start; i <= end && i < FRAMES_COUNT; ++i) { diff --git a/arch/pfa.h b/arch/pfa.h index 881b44b..dc49ede 100644 --- a/arch/pfa.h +++ b/arch/pfa.h @@ -8,7 +8,7 @@ void pfa_initialize(const struct KernelMQ_Info *kinfo); unsigned long pfa_alloc_page(); unsigned long pfa_alloc_big_page(); -void pfa_free_page(unsigned long addr); -void pfa_free_big_page(unsigned long addr); +void pfa_free_page(unsigned long base); +void pfa_free_big_page(unsigned long base); #endif diff --git a/arch/tasks.h b/arch/tasks.h index 3834adb..7658a5b 100644 --- a/arch/tasks.h +++ b/arch/tasks.h @@ -1,6 +1,6 @@ #ifndef KERNELMQ_INCLUDED_TASKS #define KERNELMQ_INCLUDED_TASKS 1 -void tasks_switch_to_user(unsigned long addr); +void tasks_switch_to_user(unsigned long base); #endif