1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-19 08:52:25 +00:00

os: amend io region api

This commit is contained in:
Michael Scire 2021-10-01 01:02:48 -07:00
parent 3eac814268
commit 00d0c94f2d
3 changed files with 4 additions and 4 deletions

View file

@ -51,8 +51,8 @@ namespace ams::os {
DestroyIoRegion(std::addressof(m_io_region)); DestroyIoRegion(std::addressof(m_io_region));
} }
void Attach(size_t size, Handle handle, bool managed) { void AttachHandle(size_t size, Handle handle, bool managed) {
AttachIoRegion(std::addressof(m_io_region), size, handle, managed); AttachIoRegionHandle(std::addressof(m_io_region), size, handle, managed);
} }
Handle GetHandle() const { Handle GetHandle() const {

View file

@ -24,7 +24,7 @@ namespace ams::os {
Result CreateIoRegion(IoRegionType *io_region, Handle io_pool_handle, uintptr_t address, size_t size, MemoryMapping mapping, MemoryPermission permission); Result CreateIoRegion(IoRegionType *io_region, Handle io_pool_handle, uintptr_t address, size_t size, MemoryMapping mapping, MemoryPermission permission);
void AttachIoRegion(IoRegionType *io_region, size_t size, Handle handle, bool managed); void AttachIoRegionHandle(IoRegionType *io_region, size_t size, Handle handle, bool managed);
void DestroyIoRegion(IoRegionType *io_region); void DestroyIoRegion(IoRegionType *io_region);

View file

@ -59,7 +59,7 @@ namespace ams::os {
return ResultSuccess(); return ResultSuccess();
} }
void AttachIoRegion(IoRegionType *io_region, size_t size, Handle handle, bool managed) { void AttachIoRegionHandle(IoRegionType *io_region, size_t size, Handle handle, bool managed) {
/* Check pre-conditions. */ /* Check pre-conditions. */
AMS_ASSERT(io_region != nullptr); AMS_ASSERT(io_region != nullptr);
AMS_ASSERT(util::IsAligned(size, os::MemoryPageSize)); AMS_ASSERT(util::IsAligned(size, os::MemoryPageSize));