mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-09 19:57:47 +02:00
Move solution and projects to src
This commit is contained in:
27
src/Ryujinx.HLE/HOS/Kernel/Memory/KScopedPageList.cs
Normal file
27
src/Ryujinx.HLE/HOS/Kernel/Memory/KScopedPageList.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
{
|
||||
struct KScopedPageList : IDisposable
|
||||
{
|
||||
private readonly KMemoryManager _manager;
|
||||
private KPageList _pageList;
|
||||
|
||||
public KScopedPageList(KMemoryManager manager, KPageList pageList)
|
||||
{
|
||||
_manager = manager;
|
||||
_pageList = pageList;
|
||||
pageList.IncrementPagesReferenceCount(manager);
|
||||
}
|
||||
|
||||
public void SignalSuccess()
|
||||
{
|
||||
_pageList = null;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_pageList?.DecrementPagesReferenceCount(_manager);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user