1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-15 00:16:48 +00:00
Atmosphere/mesosphere/source/processes/KLightClientSession.cpp

26 lines
718 B
C++
Raw Normal View History

#include <mesosphere/processes/KLightSession.hpp>
#include <mesosphere/threading/KScopedCriticalSection.hpp>
2018-11-12 11:30:58 +00:00
#include <mesosphere/threading/KThread.hpp>
#include <mesosphere/core/KCoreContext.hpp>
namespace mesosphere
{
KLightClientSession::~KLightClientSession()
{
parent->Terminate(false);
}
2018-11-12 11:30:58 +00:00
Result KLightClientSession::SendSyncRequest(LightSessionRequest *request)
{
KScopedCriticalSection critsec{};
Result res;
KThread *curThread = KCoreContext::GetCurrentInstance().GetCurrentThread();
curThread->SetCurrentLightSessionRequest(request);
curThread->ClearSync();
res = parent->server.HandleSyncRequest(*curThread);
return res.IsSuccess() ? curThread->GetSyncResult() : res;
}
}