forked from ShuriZma/suyu
core: hle: kernel: KPageTable: Operate: Assert lock ownership.
This commit is contained in:
parent
0137f2e6e1
commit
264bb5abf7
|
@ -1178,7 +1178,7 @@ VAddr KPageTable::AllocateVirtualMemory(VAddr start, std::size_t region_num_page
|
||||||
|
|
||||||
ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLinkedList& page_group,
|
ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLinkedList& page_group,
|
||||||
OperationType operation) {
|
OperationType operation) {
|
||||||
std::lock_guard lock{page_table_lock};
|
ASSERT(this->IsLockedByCurrentThread());
|
||||||
|
|
||||||
ASSERT(Common::IsAligned(addr, PageSize));
|
ASSERT(Common::IsAligned(addr, PageSize));
|
||||||
ASSERT(num_pages > 0);
|
ASSERT(num_pages > 0);
|
||||||
|
@ -1203,7 +1203,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLin
|
||||||
|
|
||||||
ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermission perm,
|
ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermission perm,
|
||||||
OperationType operation, PAddr map_addr) {
|
OperationType operation, PAddr map_addr) {
|
||||||
std::lock_guard lock{page_table_lock};
|
ASSERT(this->IsLockedByCurrentThread());
|
||||||
|
|
||||||
ASSERT(num_pages > 0);
|
ASSERT(num_pages > 0);
|
||||||
ASSERT(Common::IsAligned(addr, PageSize));
|
ASSERT(Common::IsAligned(addr, PageSize));
|
||||||
|
|
Loading…
Reference in New Issue