aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-06-10 21:46:42 -0300
committergdkchan <gab.dark.100@gmail.com>2018-06-10 21:46:42 -0300
commit76f3b1b3a4637ec72abfbb8cbc0679f2e0ca838f (patch)
tree0411b709de31c1c0517763512df8eeb9f7491bc9 /Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs
parent518fe799da6dd4f12c58c9e6e174767effb0b868 (diff)
Rename Ryujinx.Core to Ryujinx.HLE and add a separate project for a future LLE implementation
Diffstat (limited to 'Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs')
-rw-r--r--Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs b/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs
new file mode 100644
index 00000000..7902034c
--- /dev/null
+++ b/Ryujinx.HLE/OsHle/Services/Nv/NvMap/NvMapHandle.cs
@@ -0,0 +1,37 @@
+using System.Threading;
+
+namespace Ryujinx.HLE.OsHle.Services.Nv.NvMap
+{
+ class NvMapHandle
+ {
+ public int Handle;
+ public int Id;
+ public int Size;
+ public int Align;
+ public int Kind;
+ public long Address;
+ public bool Allocated;
+
+ private long Dupes;
+
+ public NvMapHandle()
+ {
+ Dupes = 1;
+ }
+
+ public NvMapHandle(int Size) : this()
+ {
+ this.Size = Size;
+ }
+
+ public long IncrementRefCount()
+ {
+ return Interlocked.Increment(ref Dupes);
+ }
+
+ public long DecrementRefCount()
+ {
+ return Interlocked.Decrement(ref Dupes);
+ }
+ }
+} \ No newline at end of file