diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-21 00:13:25 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-21 00:13:25 +0200 |
commit | 44336329eddd7dbe1f76144e9a1e95e5f76ed372 (patch) | |
tree | 49c103d52af50fe6ef451324f1c8aae6363d0468 /src/core/hle/service | |
parent | apt: changed stubbed handle to be something other than 0xDEADBEEF (used as a magic value in other places) so that I can track how it propagates through the app code (diff) | |
download | yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.tar yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.tar.gz yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.tar.bz2 yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.tar.lz yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.tar.xz yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.tar.zst yuzu-44336329eddd7dbe1f76144e9a1e95e5f76ed372.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/service.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/service.h | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index b3e414e0f..08d0c43ff 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -34,7 +34,7 @@ Manager::~Manager() { /// Add a service to the manager (does not create it though) void Manager::AddService(Interface* service) { - m_port_map[service->GetPortName()] = g_kernel_objects.Create(service); + m_port_map[service->GetPortName()] = Kernel::g_object_pool.Create(service); m_services.push_back(service); } @@ -48,7 +48,7 @@ void Manager::DeleteService(std::string port_name) { /// Get a Service Interface from its Handle Interface* Manager::FetchFromHandle(Handle handle) { - return g_kernel_objects.GetFast<Interface>(handle); + return Kernel::g_object_pool.GetFast<Interface>(handle); } /// Get a Service Interface from its port diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 450a439fe..f334dbcb8 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -36,15 +36,15 @@ inline static u32* GetCommandBuffer(const int offset=0) { class Manager; /// Interface to a CTROS service -class Interface : public KernelObject { +class Interface : public Kernel::Object { friend class Manager; public: const char *GetName() { return GetPortName(); } const char *GetTypeName() { return GetPortName(); } - static KernelIDType GetStaticIDType() { return KERNEL_ID_TYPE_THREAD; } - KernelIDType GetIDType() const { return KERNEL_ID_TYPE_THREAD; } + static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Service; } + Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Service; } typedef void (*Function)(Interface*); @@ -63,8 +63,8 @@ public: } /// Allocates a new handle for the service - Handle CreateHandle(KernelObject *obj) { - Handle handle = g_kernel_objects.Create(obj); + Handle CreateHandle(Kernel::Object *obj) { + Handle handle = Kernel::g_object_pool.Create(obj); m_handles.push_back(handle); return handle; } @@ -72,7 +72,7 @@ public: /// Frees a handle from the service template <class T> void DeleteHandle(const Handle handle) { - g_kernel_objects.Destroy<T>(handle); + g_object_pool.Destroy<T>(handle); m_handles.erase(std::remove(m_handles.begin(), m_handles.end(), handle), m_handles.end()); } |