aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/GlobalStateTable.cs
diff options
context:
space:
mode:
authorThomas Guillemard <me@thog.eu>2019-11-02 23:47:56 +0100
committerjduncanator <1518948+jduncanator@users.noreply.github.com>2019-11-03 09:47:56 +1100
commit9426ef3f06916f4206213b28b1ca162c851d4e07 (patch)
tree1968c0ac68da5759481881c0c792d5e5ed8c08d0 /Ryujinx.HLE/HOS/GlobalStateTable.cs
parent848cda1837334170f6658e73e8803e4824425810 (diff)
Rewrite nvservices (#800)
* Start rewriting nvservices internals TODO: - nvgpu device interface - nvhost generic device interface * Some clean up and fixes - Make sure to remove the fd of a closed channel. - NvFileDevice now doesn't implement Disposable as it was never used. - Rename NvHostCtrlGetConfigurationArgument to GetConfigurationArguments to follow calling convention. - Make sure to check every ioctls magic. * Finalize migration for ioctl standard variant TODO: ioctl2 migration * Implement SubmitGpfifoEx and fix nvdec * Implement Ioctl3 * Implement some ioctl3 required by recent games * Remove unused code and outdated comments * Return valid event handles with QueryEvent Also add an exception for unimplemented event ids. This commit doesn't implement accurately the events, this only define different events for different event ids. * Rename all occurance of FileDevice to DeviceFile * Restub SetClientPid to not cause regressions * Address comments * Remove GlobalStateTable * Address comments * Align variables in ioctl3 * Some missing alignments * GetVaRegionsArguments realign * Make Owner public in NvDeviceFile * Address LDj3SNuD's comments
Diffstat (limited to 'Ryujinx.HLE/HOS/GlobalStateTable.cs')
-rw-r--r--Ryujinx.HLE/HOS/GlobalStateTable.cs70
1 files changed, 0 insertions, 70 deletions
diff --git a/Ryujinx.HLE/HOS/GlobalStateTable.cs b/Ryujinx.HLE/HOS/GlobalStateTable.cs
deleted file mode 100644
index 5e5e5ecf..00000000
--- a/Ryujinx.HLE/HOS/GlobalStateTable.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Ryujinx.HLE.HOS.Kernel.Process;
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-
-namespace Ryujinx.HLE.HOS
-{
- class GlobalStateTable
- {
- private ConcurrentDictionary<KProcess, IdDictionary> _dictByProcess;
-
- public GlobalStateTable()
- {
- _dictByProcess = new ConcurrentDictionary<KProcess, IdDictionary>();
- }
-
- public bool Add(KProcess process, int id, object data)
- {
- IdDictionary dict = _dictByProcess.GetOrAdd(process, (key) => new IdDictionary());
-
- return dict.Add(id, data);
- }
-
- public int Add(KProcess process, object data)
- {
- IdDictionary dict = _dictByProcess.GetOrAdd(process, (key) => new IdDictionary());
-
- return dict.Add(data);
- }
-
- public object GetData(KProcess process, int id)
- {
- if (_dictByProcess.TryGetValue(process, out IdDictionary dict))
- {
- return dict.GetData(id);
- }
-
- return null;
- }
-
- public T GetData<T>(KProcess process, int id)
- {
- if (_dictByProcess.TryGetValue(process, out IdDictionary dict))
- {
- return dict.GetData<T>(id);
- }
-
- return default(T);
- }
-
- public object Delete(KProcess process, int id)
- {
- if (_dictByProcess.TryGetValue(process, out IdDictionary dict))
- {
- return dict.Delete(id);
- }
-
- return null;
- }
-
- public ICollection<object> DeleteProcess(KProcess process)
- {
- if (_dictByProcess.TryRemove(process, out IdDictionary dict))
- {
- return dict.Clear();
- }
-
- return null;
- }
- }
-} \ No newline at end of file