meso: Implement LightSession functions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <mesosphere/processes/KLightClientSession.hpp>
|
||||
#include <mesosphere/processes/KLightSession.hpp>
|
||||
#include <mesosphere/threading/KScopedCriticalSection.hpp>
|
||||
#include <mesosphere/threading/KThread.hpp>
|
||||
#include <mesosphere/core/KCoreContext.hpp>
|
||||
|
||||
namespace mesosphere
|
||||
{
|
||||
@@ -10,5 +11,15 @@ KLightClientSession::~KLightClientSession()
|
||||
parent->Terminate(false);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user