0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Core/OsHle/Handles/HSharedMem.cs

43 lines
943 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Handles
2018-02-04 23:08:20 +00:00
{
class HSharedMem
{
private List<long> Positions;
public EventHandler<EventArgs> MemoryMapped;
public EventHandler<EventArgs> MemoryUnmapped;
2018-02-04 23:08:20 +00:00
public HSharedMem()
2018-02-04 23:08:20 +00:00
{
Positions = new List<long>();
}
public void AddVirtualPosition(long Position)
{
lock (Positions)
{
Positions.Add(Position);
MemoryMapped?.Invoke(this, EventArgs.Empty);
}
}
public void RemoveVirtualPosition(long Position)
{
lock (Positions)
{
Positions.Remove(Position);
MemoryUnmapped?.Invoke(this, EventArgs.Empty);
}
}
public long[] GetVirtualPositions()
{
return Positions.ToArray();
2018-02-04 23:08:20 +00:00
}
}
}