From 814ec82ad4cb96569f514d4010258d02d1d7fde3 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 24 May 2015 21:38:49 -0700 Subject: [PATCH] Removing old GetObject. --- src/xenia/kernel/object_table.cc | 36 -------------------------------- src/xenia/kernel/object_table.h | 2 -- 2 files changed, 38 deletions(-) diff --git a/src/xenia/kernel/object_table.cc b/src/xenia/kernel/object_table.cc index 771fbbe61..0e2b0946d 100644 --- a/src/xenia/kernel/object_table.cc +++ b/src/xenia/kernel/object_table.cc @@ -151,42 +151,6 @@ X_STATUS ObjectTable::RemoveHandle(X_HANDLE handle) { return result; } -X_STATUS ObjectTable::GetObject(X_HANDLE handle, XObject** out_object, - bool already_locked) { - handle = TranslateHandle(handle); - if (!handle) { - return X_STATUS_INVALID_HANDLE; - } - - XObject* object = nullptr; - if (!already_locked) { - table_mutex_.lock(); - } - - // Lower 2 bits are ignored. - uint32_t slot = handle >> 2; - - // Verify slot. - if (slot < table_capacity_) { - ObjectTableEntry& entry = table_[slot]; - if (entry.object) { - object = entry.object; - } - } - - // Retain the object pointer. - if (object) { - object->Retain(); - } - - if (!already_locked) { - table_mutex_.unlock(); - } - - *out_object = object; - return object ? X_STATUS_SUCCESS : X_STATUS_INVALID_HANDLE; -} - XObject* ObjectTable::LookupObject(X_HANDLE handle, bool already_locked) { handle = TranslateHandle(handle); if (!handle) { diff --git a/src/xenia/kernel/object_table.h b/src/xenia/kernel/object_table.h index 0cbe3e8c0..786f82a25 100644 --- a/src/xenia/kernel/object_table.h +++ b/src/xenia/kernel/object_table.h @@ -28,8 +28,6 @@ class ObjectTable { X_STATUS AddHandle(XObject* object, X_HANDLE* out_handle); X_STATUS RemoveHandle(X_HANDLE handle); - X_STATUS GetObject(X_HANDLE handle, XObject** out_object, - bool already_locked = false); template object_ref LookupObject(X_HANDLE handle) { auto object = LookupObject(handle, false);