aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-03-19 15:58:46 -0300
committerGitHub <noreply@github.com>2018-03-19 15:58:46 -0300
commit4314a8f3e5b76bbf2143f701c06e9354de712027 (patch)
treeacded3e24125e54bc791f322f0be869f1d379c19 /Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs
parent4940cf0ea58c77c8666d76abdfc35c6380efed4c (diff)
[WIP] Add support for events (#60)
* Add support for events, move concept of domains to IpcService * Support waiting for KThread, remove some test code, other tweaks * Use move handle on NIFM since I can't test that now, it's better to leave it how it was
Diffstat (limited to 'Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs')
-rw-r--r--Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs39
1 files changed, 5 insertions, 34 deletions
diff --git a/Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs b/Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs
index 1156e035..2c809883 100644
--- a/Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs
+++ b/Ryujinx.Core/OsHle/Handles/KProcessHandleTable.cs
@@ -1,8 +1,8 @@
-using System;
+using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Handles
{
- class KProcessHandleTable : IDisposable
+ class KProcessHandleTable
{
private IdDictionary Handles;
@@ -21,43 +21,14 @@ namespace Ryujinx.Core.OsHle.Handles
return Handles.GetData<T>(Handle);
}
- public bool ReplaceData(int Id, object Data)
+ public object CloseHandle(int Handle)
{
- return Handles.ReplaceData(Id, Data);
- }
-
- public bool CloseHandle(int Handle)
- {
- object Data = Handles.GetData(Handle);
-
- if (Data is HTransferMem TMem)
- {
- TMem.Memory.Manager.Reprotect(
- TMem.Position,
- TMem.Size,
- TMem.Perm);
- }
-
return Handles.Delete(Handle);
}
- public void Dispose()
- {
- Dispose(true);
- }
-
- protected virtual void Dispose(bool Disposing)
+ public ICollection<object> Clear()
{
- if (Disposing)
- {
- foreach (object Obj in Handles)
- {
- if (Obj is IDisposable DisposableObj)
- {
- DisposableObj.Dispose();
- }
- }
- }
+ return Handles.Clear();
}
}
} \ No newline at end of file