From 2fc5c783edf2382968f573aca1e33a43d9f12877 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 5 Aug 2018 21:31:56 -0400 Subject: memory: Remove unnecessary const qualifiers in prototypes These aren't necessary, as value-wise const only matters in the definition. --- src/core/memory.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/core/memory.h b/src/core/memory.h index b5d885b8a..1d0484c0c 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -140,10 +140,10 @@ void SetCurrentPageTable(PageTable* page_table); PageTable* GetCurrentPageTable(); /// Determines if the given VAddr is valid for the specified process. -bool IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr); -bool IsValidVirtualAddress(const VAddr addr); +bool IsValidVirtualAddress(const Kernel::Process& process, VAddr vaddr); +bool IsValidVirtualAddress(VAddr addr); /// Determines if the given VAddr is a kernel address -bool IsKernelVirtualAddress(const VAddr addr); +bool IsKernelVirtualAddress(VAddr addr); u8 Read8(VAddr addr); u16 Read16(VAddr addr); @@ -155,13 +155,12 @@ void Write16(VAddr addr, u16 data); void Write32(VAddr addr, u32 data); void Write64(VAddr addr, u64 data); -void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_buffer, - size_t size); -void ReadBlock(const VAddr src_addr, void* dest_buffer, size_t size); -void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const void* src_buffer, +void ReadBlock(const Kernel::Process& process, VAddr src_addr, void* dest_buffer, size_t size); +void ReadBlock(VAddr src_addr, void* dest_buffer, size_t size); +void WriteBlock(const Kernel::Process& process, VAddr dest_addr, const void* src_buffer, size_t size); -void WriteBlock(const VAddr dest_addr, const void* src_buffer, size_t size); -void ZeroBlock(const VAddr dest_addr, const size_t size); +void WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size); +void ZeroBlock(VAddr dest_addr, size_t size); void CopyBlock(VAddr dest_addr, VAddr src_addr, size_t size); u8* GetPointer(VAddr virtual_address); -- cgit v1.2.3 From 4aa31b06189de54ab4eee79da8b832cc9e5574f9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 5 Aug 2018 21:34:00 -0400 Subject: memory: Correct prototype of ZeroBlock Previously, the prototype wasn't matching the definition, which has a Processor parameter before the destination address. --- src/core/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/memory.h b/src/core/memory.h index 1d0484c0c..73c0bf4ad 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -160,7 +160,7 @@ void ReadBlock(VAddr src_addr, void* dest_buffer, size_t size); void WriteBlock(const Kernel::Process& process, VAddr dest_addr, const void* src_buffer, size_t size); void WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size); -void ZeroBlock(VAddr dest_addr, size_t size); +void ZeroBlock(const Kernel::Process& process, VAddr dest_addr, size_t size); void CopyBlock(VAddr dest_addr, VAddr src_addr, size_t size); u8* GetPointer(VAddr virtual_address); -- cgit v1.2.3 From 2a7a2b739b3d026c2eed4449c4daf4bc8fe317df Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 5 Aug 2018 21:36:44 -0400 Subject: memory: Make prototype parameter names match their definitions Keeps the code consistent. --- src/core/memory.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/core/memory.h b/src/core/memory.h index 73c0bf4ad..b7fb3b9ed 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -141,9 +141,9 @@ PageTable* GetCurrentPageTable(); /// Determines if the given VAddr is valid for the specified process. bool IsValidVirtualAddress(const Kernel::Process& process, VAddr vaddr); -bool IsValidVirtualAddress(VAddr addr); +bool IsValidVirtualAddress(VAddr vaddr); /// Determines if the given VAddr is a kernel address -bool IsKernelVirtualAddress(VAddr addr); +bool IsKernelVirtualAddress(VAddr vaddr); u8 Read8(VAddr addr); u16 Read16(VAddr addr); @@ -163,9 +163,9 @@ void WriteBlock(VAddr dest_addr, const void* src_buffer, size_t size); void ZeroBlock(const Kernel::Process& process, VAddr dest_addr, size_t size); void CopyBlock(VAddr dest_addr, VAddr src_addr, size_t size); -u8* GetPointer(VAddr virtual_address); +u8* GetPointer(VAddr vaddr); -std::string ReadCString(VAddr virtual_address, std::size_t max_length); +std::string ReadCString(VAddr vaddr, std::size_t max_length); enum class FlushMode { /// Write back modified surfaces to RAM @@ -179,7 +179,7 @@ enum class FlushMode { /** * Mark each page touching the region as cached. */ -void RasterizerMarkRegionCached(Tegra::GPUVAddr start, u64 size, bool cached); +void RasterizerMarkRegionCached(Tegra::GPUVAddr gpu_addr, u64 size, bool cached); /** * Flushes and invalidates any externally cached rasterizer resources touching the given virtual -- cgit v1.2.3