diff options
| author | 2017-05-29 15:10:06 -0700 | |
|---|---|---|
| committer | 2017-05-29 15:10:06 -0700 | |
| commit | 9453223075e100a94b274613f1da0c47f747edf5 (patch) | |
| tree | e65fa84679813cbb9f8bea10bcaab49d07753325 | |
| parent | Kernel: Extract dynamic Object pointer cast into its own function (diff) | |
| download | yuzu-9453223075e100a94b274613f1da0c47f747edf5.tar.gz yuzu-9453223075e100a94b274613f1da0c47f747edf5.tar.xz yuzu-9453223075e100a94b274613f1da0c47f747edf5.zip | |
Kernel: Removed HandleTable::GetWaitObject
This isn't necessary anymore since plain Get works correctly for
WaitObjects.
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 9 | ||||
| -rw-r--r-- | src/core/hle/svc.cpp | 4 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index d8929259e..4344264dc 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -252,15 +252,6 @@ public: | |||
| 252 | return DynamicObjectCast<T>(GetGeneric(handle)); | 252 | return DynamicObjectCast<T>(GetGeneric(handle)); |
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | /** | ||
| 256 | * Looks up a handle while verifying that it is an object that a thread can wait on | ||
| 257 | * @return Pointer to the looked-up object, or `nullptr` if the handle is not valid or it is | ||
| 258 | * not a waitable object. | ||
| 259 | */ | ||
| 260 | SharedPtr<WaitObject> GetWaitObject(Handle handle) const { | ||
| 261 | return DynamicObjectCast<WaitObject>(GetGeneric(handle)); | ||
| 262 | } | ||
| 263 | |||
| 264 | /// Closes all handles held in this table. | 255 | /// Closes all handles held in this table. |
| 265 | void Clear(); | 256 | void Clear(); |
| 266 | 257 | ||
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 30230d65a..243c54c6e 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -244,7 +244,7 @@ static ResultCode CloseHandle(Kernel::Handle handle) { | |||
| 244 | 244 | ||
| 245 | /// Wait for a handle to synchronize, timeout after the specified nanoseconds | 245 | /// Wait for a handle to synchronize, timeout after the specified nanoseconds |
| 246 | static ResultCode WaitSynchronization1(Kernel::Handle handle, s64 nano_seconds) { | 246 | static ResultCode WaitSynchronization1(Kernel::Handle handle, s64 nano_seconds) { |
| 247 | auto object = Kernel::g_handle_table.GetWaitObject(handle); | 247 | auto object = Kernel::g_handle_table.Get<Kernel::WaitObject>(handle); |
| 248 | Kernel::Thread* thread = Kernel::GetCurrentThread(); | 248 | Kernel::Thread* thread = Kernel::GetCurrentThread(); |
| 249 | 249 | ||
| 250 | if (object == nullptr) | 250 | if (object == nullptr) |
| @@ -299,7 +299,7 @@ static ResultCode WaitSynchronizationN(s32* out, Kernel::Handle* handles, s32 ha | |||
| 299 | std::vector<ObjectPtr> objects(handle_count); | 299 | std::vector<ObjectPtr> objects(handle_count); |
| 300 | 300 | ||
| 301 | for (int i = 0; i < handle_count; ++i) { | 301 | for (int i = 0; i < handle_count; ++i) { |
| 302 | auto object = Kernel::g_handle_table.GetWaitObject(handles[i]); | 302 | auto object = Kernel::g_handle_table.Get<Kernel::WaitObject>(handles[i]); |
| 303 | if (object == nullptr) | 303 | if (object == nullptr) |
| 304 | return ERR_INVALID_HANDLE; | 304 | return ERR_INVALID_HANDLE; |
| 305 | objects[i] = object; | 305 | objects[i] = object; |