mirror of https://git.suyu.dev/suyu/suyu
hle: kernel: k_server_session: Return service thread by strong pointer.
This commit is contained in:
parent
93f93cb8bc
commit
ada4242c01
|
@ -85,8 +85,8 @@ public:
|
||||||
*/
|
*/
|
||||||
void ClientDisconnected(KServerSession* session);
|
void ClientDisconnected(KServerSession* session);
|
||||||
|
|
||||||
std::weak_ptr<ServiceThread> GetServiceThread() const {
|
std::shared_ptr<ServiceThread> GetServiceThread() const {
|
||||||
return service_thread;
|
return service_thread.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -152,7 +152,7 @@ public:
|
||||||
session_handler = std::move(handler);
|
session_handler = std::move(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::weak_ptr<ServiceThread> GetServiceThread() const {
|
std::shared_ptr<ServiceThread> GetServiceThread() const {
|
||||||
return session_handler->GetServiceThread();
|
return session_handler->GetServiceThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor
|
||||||
|
|
||||||
context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
|
context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
|
||||||
|
|
||||||
if (auto strong_ptr = manager->GetServiceThread().lock(); strong_ptr) {
|
if (auto strong_ptr = manager->GetServiceThread(); strong_ptr) {
|
||||||
strong_ptr->QueueSyncRequest(*parent, std::move(context));
|
strong_ptr->QueueSyncRequest(*parent, std::move(context));
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue