mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-21 18:35:13 -04:00
kern: Add special-case for InvalidateProcessDataCache on current process
This commit is contained in:
parent
2a4d68f916
commit
3737151a2f
4 changed files with 27 additions and 1 deletions
|
@ -102,7 +102,11 @@ namespace ams::kern::svc {
|
|||
R_UNLESS(process.IsNotNull(), svc::ResultInvalidHandle());
|
||||
|
||||
/* Invalidate the cache. */
|
||||
R_TRY(process->GetPageTable().InvalidateProcessDataCache(address, size));
|
||||
if (process.GetPointerUnsafe() == GetCurrentProcessPointer()) {
|
||||
R_TRY(process->GetPageTable().InvalidateCurrentProcessDataCache(address, size));
|
||||
} else {
|
||||
R_TRY(process->GetPageTable().InvalidateProcessDataCache(address, size));
|
||||
}
|
||||
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue